x/tools/gopls: specify Options.LangVersion when invoking gofumpt #43998
gofumpt's API has an option to specify the Go language version to target: https://pkg.go.dev/mvdan.cc/gofumpt/format#Options
Unfortunately, this seems to not be wired into gopls: https://github.com/golang/tools/blob/e9a2c0706a5b9cc8ee5965d5a50c996ffb255a7b/gopls/internal/hooks/hooks.go#L26
This results in gofumpt having to fall back to assuming the code has to comply with Go 1.0 as a language, not enabling rules which affect newer language features such as octal numbers.
This should be an easy fix, I think. When run from the command line,
The text was updated successfully, but these errors were encountered: