We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gofumpt panics when the go directive is missing in a go.mod file.
gofumpt
go
go.mod
For example, we get a panic when trying to run gofumpt on the repo google/uuid (latest v1.6.0), which doesn't have the go directive in it.
google/uuid
❯ go run mvdan.cc/gofumpt@latest -w . panic: invalid Go version: "go" goroutine 6 [running]: mvdan.cc/gofumpt/format.File(0x14000288000, 0x1400029e000, {{0x100348354, 0x2}, {0x140000146a8, 0x16}, 0x0}) /Users/Oleksandr_Redko/go/pkg/mod/mvdan.cc/[email protected]/format/format.go:99 +0x23c main.processFile({0x140001ce498, 0x6}, {0x1003f1068, 0x140001da270}, {0x0?, 0x0?}, 0x14000028f20, 0x0) /Users/Oleksandr_Redko/go/pkg/mod/mvdan.cc/[email protected]/gofmt.go:313 +0x23c main.gofmtMain.func4.1(0x0?) /Users/Oleksandr_Redko/go/pkg/mod/mvdan.cc/[email protected]/gofmt.go:529 +0x40 main.(*sequencer).Add.func2() /Users/Oleksandr_Redko/go/pkg/mod/mvdan.cc/[email protected]/gofmt.go:191 +0x48 created by main.(*sequencer).Add in goroutine 1 /Users/Oleksandr_Redko/go/pkg/mod/mvdan.cc/[email protected]/gofmt.go:190 +0x1a8 exit status 2
The documentation states, that "If the go directive is missing, go 1.16 is assumed".
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
gofumpt
panics when thego
directive is missing in ago.mod
file.For example, we get a panic when trying to run
gofumpt
on the repogoogle/uuid
(latest v1.6.0), which doesn't have thego
directive in it.The documentation states, that "If the go directive is missing, go 1.16 is assumed".
The text was updated successfully, but these errors were encountered: