diff options
author | Bryan C. Mills <bcmills@google.com> | 2020-10-13 10:58:13 -0400 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2020-10-27 06:32:35 +0000 |
commit | 1095dd6339dbaf8d7c92214396c0a4dbcfa38521 (patch) | |
tree | cecadbe9d8833473549518ced99758f49af7ee9b /src/cmd/go/internal/modload/buildlist.go | |
parent | 7eba75ab60d5d76b605d6095c64ddd38218c963b (diff) | |
download | go-1095dd6339dbaf8d7c92214396c0a4dbcfa38521.tar.gz go-1095dd6339dbaf8d7c92214396c0a4dbcfa38521.zip |
cmd/go/internal/modload: embed PackageOpts in loaderParams
Instead of duplicating PackageOpts fields in the loaderParams struct,
embed the PackageOpts directly. Many of the fields are duplicated, and
further fields that would also be duplicated will be added in
subsequent changes.
For #36460
Change-Id: I3b0770d162e901d23ec1643183eb07c413d51e0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/263138
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Diffstat (limited to 'src/cmd/go/internal/modload/buildlist.go')
-rw-r--r-- | src/cmd/go/internal/modload/buildlist.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modload/buildlist.go b/src/cmd/go/internal/modload/buildlist.go index 76e5fe0173..4a183d6881 100644 --- a/src/cmd/go/internal/modload/buildlist.go +++ b/src/cmd/go/internal/modload/buildlist.go @@ -78,7 +78,9 @@ func SetBuildList(list []module.Version) { // the build list set in SetBuildList. func ReloadBuildList() []module.Version { loaded = loadFromRoots(loaderParams{ - tags: imports.Tags(), + PackageOpts: PackageOpts{ + Tags: imports.Tags(), + }, listRoots: func() []string { return nil }, allClosesOverTests: index.allPatternClosesOverTests(), // but doesn't matter because the root list is empty. }) |