Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/cmd/goimports: Panics when GO111MODULE=on and there is no go.mod #30855
What version of Go are you using (
I guess there's no main module when
@bcmills, is that right?
If GO111MODULE=on but there's no go.mod, GOMOD will be set to /dev/null or NUL and there will be no main module. goimports should handle this case roughly the same way the go command does. Fixes golang/go#30855 Change-Id: I6fbf4c056000db5abd8788a6014ae5f13b1c8cd4 Reviewed-on: https://go-review.googlesource.com/c/tools/+/167860 Run-TryBot: Heschi Kreinick <email@example.com> Reviewed-by: Ian Cottrell <firstname.lastname@example.org>