1
0
mirror of https://github.com/beego/bee.git synced 2025-06-12 04:50:40 +00:00

Load configuration for all commands

This removes the filepath.Walk() when loading configuration,
as it can read a Beefile from another project in the $GOPATH.
Now config.LoadConfig() is called for all available commands.
This commit is contained in:
Faissal Elamraoui
2017-03-15 15:18:33 +01:00
parent e57cc7b94e
commit 792cb3f311
6 changed files with 42 additions and 40 deletions

View File

@ -52,11 +52,8 @@ var CmdMigrate = &commands.Command{
$ bee migrate refresh [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"]
`,
PreRun: func(cmd *commands.Command, args []string) {
version.ShowShortVersionBanner()
config.LoadConfig()
},
Run: RunMigration,
PreRun: func(cmd *commands.Command, args []string) { version.ShowShortVersionBanner() },
Run: RunMigration,
}
var mDriver utils.DocValue