-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Go modules package selectors for
go list
Without module mode being enabled (`-m`), the "all" selector isn't targeting the correct packages. The documentation for "all" states: > "all" expands to all packages found in all the GOPATH trees This could feasibly select all packages on the local system. Instead, the "./..." selector is being used. This has the added benefit of being the same selector used by some of the other Go package managers. As the "./..." selector will only select packages in and beneath the current directory, the "-deps" flag has been added to also select dependencies of those packages, while the .DepOnly field ensures that local packages are not unnecessarily listed. Finally, the -mod=readonly flag has been added to explicitly ignore the vendor directory. The issue appears to be that each package of a module gets listed as the module's install path. This causes the LICENSE files to not be found (because they are at a higher path than the imported package).
- Loading branch information
Showing
2 changed files
with
10 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters