1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:04:44 -07:00
go/internal/imports
Suzy Mueller 9bea2ecb95 internal/imports: refactor to split finding and applying fixes
A pass is responsible for fixing the imports of a given file. It now
finds the necessary changes to make without applying the result to the
ast, which may be desirable to give a user more control about what
changes will be applied to their program. This change splits the process
of finding the fixes from making the modifications to the ast to allow
this functionality to be easily possible.

Change-Id: Ibf8ca247c35539f91de4be90c634f0db9a939d07
Reviewed-on: https://go-review.googlesource.com/c/tools/+/184197
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-07-02 14:45:09 +00:00
..
testdata/mod imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
fix_test.go internal/imports: suggest x for x_tests 2019-06-10 21:48:47 +00:00
fix.go internal/imports: refactor to split finding and applying fixes 2019-07-02 14:45:09 +00:00
imports.go internal/lsp, internal/imports: use the internal goimports library 2019-07-01 19:45:22 +00:00
mkindex.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
mkstdlib.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
mod_112_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
mod_test.go internal/imports: fix TestNoMainModule 2019-06-07 22:46:22 +00:00
mod.go internal/lsp, internal/imports: use the internal goimports library 2019-07-01 19:45:22 +00:00
proxy_112_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
proxy_113_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
sortimports.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
zstdlib.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00