diff options
author | Manuel Mendez <mmendez534@gmail.com> | 2022-02-25 17:06:28 -0500 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-03-04 13:32:44 +1000 |
commit | 8b5a7940b0cd1f6f232933099f12f383c3b3c32a (patch) | |
tree | ba9fc5fa7f76bc3b01387740b53e5b8b3fa8c9fd /doc/languages-frameworks | |
parent | 7bd35b61fe880ae282b7a332431b740f20406c3c (diff) |
go: Bunch of fixes when using excludedPackages and other bits
Few things going on in this commit: Do not print "Building subPakage $pkg" message if actually going to skip the package. This was confusing to me when I was trying to figure out how to set excludedPackages and seeing the "Building subpackage $pkg" messages for packages I wanted to skip. Turns out this messages was being printed before checking if we actually wanted to build the package and not necessarily that my excludedPackages was wrong. Make go-packages look a little bit more like go-modules, by adding testdata to the default list of excluded packages. This commit also does some setup outside the buildGoDir function so that we avoid checking `excludedPackages` for every package and cut down the number of grep calls by half since we always want at least one grep for the default excludedPackages, might as well just add to the patterns being checked. Finally, adds documentation for usage of excludedPackages and subPackages. I had to read the implementation to figure out how to correctly use these function arguments since there was no documentation and different uses in the code base. So this commit documents usage of the arguments.
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r-- | doc/languages-frameworks/go.section.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/languages-frameworks/go.section.md b/doc/languages-frameworks/go.section.md index 411205d08e430..9c67a514335ed 100644 --- a/doc/languages-frameworks/go.section.md +++ b/doc/languages-frameworks/go.section.md @@ -142,4 +142,8 @@ Removes the pre-existing vendor directory. This should only be used if the depen ### `subPackages` {#var-go-subPackages} -Limits the builder from building child packages that have not been listed. If `subPackages` is not specified, all child packages will be built. +Specified as a string or list of strings. Limits the builder from building child packages that have not been listed. If `subPackages` is not specified, all child packages will be built. + +### `excludedPackages` {#var-go-excludedPackages} + +Specified as a string or list of strings. Causes the builder to skip building child packages that match any of the provided values. If `excludedPackages` is not specified, all child packages will be built. |