1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:04:44 -07:00
go/imports
Heschi Kreinick 16909d206f imports: remove globals, stop using build.Default
The imports package's public API is build.Default, but that doesn't mean
we need to use it in the internal implementation or the tests. Now we
have a new type, fixEnv, that contains everything relevant from
build.Context, as well as the various global vars that were only used
for testing.

Don't worry too much about the new function parameters; they mostly
move into the resolvers in the next CL.

Refactoring only; no user-visible changes intended.

Change-Id: I0d4c904955c5854dcdf904009cb3413c734baf88
Reviewed-on: https://go-review.googlesource.com/c/158437
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-01-18 19:33:59 +00:00
..
fix_test.go imports: remove globals, stop using build.Default 2019-01-18 19:33:59 +00:00
fix.go imports: remove globals, stop using build.Default 2019-01-18 19:33:59 +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: redesign fixImports 2018-12-03 18:26:12 +00:00
sortimports.go Revert "imports: support repairing import grouping/ordering" 2018-10-24 17:12:08 +00:00
zstdlib.go imports: redesign fixImports 2018-12-03 18:26:12 +00:00