Commit e549d0fd authored by youngsterxyf's avatar youngsterxyf

move some code piece

parent c59a029c
......@@ -124,6 +124,10 @@ func init() {
workPath, _ = os.Getwd()
workPath, _ = filepath.Abs(workPath)
if workPath != AppPath {
os.Chdir(AppPath)
}
BConfig = &Config{
AppName: "beego",
RunMode: DEV,
......@@ -195,10 +199,6 @@ func init() {
// now only support ini, next will support json.
func parseConfig(appConfigPath string) (err error) {
if workPath != AppPath {
os.Chdir(AppPath)
}
AppConfig, err = newAppConfig(AppConfigProvider, appConfigPath)
if err != nil {
return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment