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 <heschi@google.com> Reviewed-by: Ian Cottrell <iancottrell@google.com> |
||
|---|---|---|
| .. | ||
| testdata/mod | ||
| fix.go | ||
| fix_test.go | ||
| imports.go | ||
| mkindex.go | ||
| mkstdlib.go | ||
| mod.go | ||
| mod_112_test.go | ||
| mod_test.go | ||
| sortimports.go | ||
| zstdlib.go | ||