1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:54:49 -07:00
go/internal/imports
Suzy Mueller 857b4dd9f8 internal/imports: avoid walking dir for mod file in mod cache
The root of the module containing a package in the module cache can be
determined by looking at the directory path. Use this instead of
scanning up the file tree to find the mod file of a package from a
module cache. The go command prunes nested modules before populating
the module cache, so there is only one go.mod within each module.

Change-Id: I434a04350ef3ca2f44b7ffd08ccc5afe4209654f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/190906
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-08-29 20:29:07 +00:00
..
testdata/mod imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
fix_test.go internal/imports: get candidate imports 2019-08-16 16:26:37 +00:00
fix.go internal/imports: get candidate imports 2019-08-16 16:26:37 +00:00
imports_test.go internal/imports: test exported functions with nil args 2019-08-14 23:42:26 +00:00
imports.go internal/imports: get candidate imports 2019-08-16 16:26:37 +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_cache.go internal/imports: save information about the module cache 2019-08-20 18:54:49 +00:00
mod_test.go internal/imports: avoid walking dir for mod file in mod cache 2019-08-29 20:29:07 +00:00
mod.go internal/imports: avoid walking dir for mod file in mod cache 2019-08-29 20:29:07 +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 internal/imports: merge import declarations 2019-08-14 23:54:02 +00:00
zstdlib.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00