mirror of
https://github.com/beego/bee.git
synced 2025-07-03 15:20:17 +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:
@ -80,9 +80,7 @@ func init() {
|
||||
importlist = make(map[string]string)
|
||||
controllerList = make(map[string]map[string]*swagger.Item)
|
||||
modelsList = make(map[string]map[string]swagger.Schema)
|
||||
curPath, _ := os.Getwd()
|
||||
astPkgs = map[string]*ast.Package{}
|
||||
parsePackagesFromDir(curPath)
|
||||
}
|
||||
|
||||
func parsePackagesFromDir(dirpath string) {
|
||||
|
Reference in New Issue
Block a user