1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 12:50:55 +00:00

move some code piece

This commit is contained in:
youngsterxyf 2016-01-27 12:13:26 +08:00
parent c59a029ce7
commit e549d0fd9c

View File

@ -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