1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:36:10 -07:00
go/imports
Heschi Kreinick c74ccfb859 imports: handle missing main module
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>
2019-03-15 20:09:29 +00:00
..
testdata/mod imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
fix_test.go imports: drop anything after a non identifier rune in package names 2019-01-30 18:50:28 +00:00
fix.go imports: drop anything after a non identifier rune in package names 2019-01-30 18:50:28 +00:00
imports.go imports: remove globals, stop using build.Default 2019-01-18 19:33:59 +00:00
mkindex.go go.tools/imports: move goimports from github to go.tools. 2013-12-17 21:21:03 -05:00
mkstdlib.go imports: update zstdlib to Go 1.12 2019-01-30 01:50:43 +00:00
mod_112_test.go imports: handle missing main module 2019-03-15 20:09:29 +00:00
mod_test.go imports: handle missing main module 2019-03-15 20:09:29 +00:00
mod.go imports: handle missing main module 2019-03-15 20:09:29 +00:00
sortimports.go Revert "imports: support repairing import grouping/ordering" 2018-10-24 17:12:08 +00:00
zstdlib.go imports: update zstdlib to Go 1.12 2019-01-30 01:50:43 +00:00