Added gomod-flags

Added a gomod-flags parameter which allows you to run go mod commands on the go.mod file before the build is performed. This allows for development environments.
This commit is contained in:
notzippy@gmail.com
2020-04-29 17:05:39 -07:00
parent 0920905a0c
commit 20d5766eb6
4 changed files with 38 additions and 23 deletions

View File

@@ -48,6 +48,7 @@ type (
Vendored bool // True if the application is vendored
PackageResolver func(pkgName string) error // a package resolver for the config
BuildFlags []string `short:"X" long:"build-flags" description:"These flags will be used when building the application. May be specified multiple times, only applicable for Build, Run, Package, Test commands"`
GoModFlags []string `long:"gomod-flags" description:"These flags will execut go mod commands for each flag, this happens during the build process"`
New command.New `command:"new"`
Build command.Build `command:"build"`
Run command.Run `command:"run"`