diff options
author | Bryan C. Mills <bcmills@google.com> | 2020-11-19 13:58:52 -0500 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2020-11-20 15:19:17 +0000 |
commit | cb3f84ad25abaea28dad905ceddd81a5a334e806 (patch) | |
tree | 696c4153af5c05ec752a64ad693eed997e8881ae /src/cmd/go/internal/modload/buildlist.go | |
parent | 8bbd8294d01b66bf47514dee94d3c4341566e357 (diff) | |
download | go-cb3f84ad25abaea28dad905ceddd81a5a334e806.tar.gz go-cb3f84ad25abaea28dad905ceddd81a5a334e806.zip |
cmd/go/internal/modload: eliminate LoadedModules
As of CL 271646, all external callers have been eliminated. Replace
the remaining internal caller with a direct reference to the buildList
variable and remove the exported function to prevent backsliding.
For #36460
Change-Id: Iea82df1e3e604ada602dda3e830c06d441eee2a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/271647
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/modload/buildlist.go')
-rw-r--r-- | src/cmd/go/internal/modload/buildlist.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/cmd/go/internal/modload/buildlist.go b/src/cmd/go/internal/modload/buildlist.go index 5b9984a492..bec22dba1f 100644 --- a/src/cmd/go/internal/modload/buildlist.go +++ b/src/cmd/go/internal/modload/buildlist.go @@ -49,15 +49,6 @@ func LoadAllModules(ctx context.Context) []module.Version { return capVersionSlice(buildList) } -// LoadedModules returns the list of module requirements loaded or set by a -// previous call (typically LoadAllModules or LoadPackages), starting with the -// Target module and in a deterministic (stable) order. -// -// The caller must not modify the returned list, but may append to it. -func LoadedModules() []module.Version { - return capVersionSlice(buildList) -} - // Selected returns the selected version of the module with the given path, or // the empty string if the given module has no selected version // (either because it is not required or because it is the Target module). |