1
0
mirror of https://github.com/beego/bee.git synced 2025-07-04 01:20:19 +00:00

Support extra args to run application.

This commit is contained in:
Codeb Fan
2018-06-26 18:07:49 +08:00
parent e90da8f77b
commit cd82742af9
2 changed files with 10 additions and 1 deletions

View File

@ -58,6 +58,8 @@ var (
currentGoPath string
// Current runmode
runmode string
// Extra args to run application
runargs string
// Extra directories
extraPackages utils.StrFlags
)
@ -71,6 +73,7 @@ func init() {
CmdRun.Flag.BoolVar(&vendorWatch, "vendor", false, "Enable watch vendor folder.")
CmdRun.Flag.StringVar(&buildTags, "tags", "", "Set the build tags. See: https://golang.org/pkg/go/build/")
CmdRun.Flag.StringVar(&runmode, "runmode", "", "Set the Beego run mode.")
CmdRun.Flag.StringVar(&runargs, "runargs", "", "Extra args to run application")
CmdRun.Flag.Var(&extraPackages, "ex", "List of extra package to watch.")
exit = make(chan bool)
commands.AvailableCommands = append(commands.AvailableCommands, CmdRun)