mirror of
https://github.com/beego/bee.git
synced 2025-07-09 09:50:19 +00:00
Added PreRun phase to Command struct
Now each command has a PreRun function that will execute before calling the Run() function. This allows to show the banner and do some pre-check work. Also moved parsePackagesFromDir() to the main function to avoid getting called each time 'bee' is invoked.
This commit is contained in:
@ -53,6 +53,7 @@ var docport docValue
|
||||
|
||||
func init() {
|
||||
cmdRundocs.Run = runDocs
|
||||
cmdRundocs.PreRun = func(cmd *Command, args []string) { ShowShortVersionBanner() }
|
||||
cmdRundocs.Flag.Var(&isDownload, "isDownload", "weather download the Swagger Docs")
|
||||
cmdRundocs.Flag.Var(&docport, "docport", "doc server port")
|
||||
}
|
||||
|
Reference in New Issue
Block a user