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:
parent
c59a029ce7
commit
e549d0fd9c
@ -124,6 +124,10 @@ func init() {
|
|||||||
workPath, _ = os.Getwd()
|
workPath, _ = os.Getwd()
|
||||||
workPath, _ = filepath.Abs(workPath)
|
workPath, _ = filepath.Abs(workPath)
|
||||||
|
|
||||||
|
if workPath != AppPath {
|
||||||
|
os.Chdir(AppPath)
|
||||||
|
}
|
||||||
|
|
||||||
BConfig = &Config{
|
BConfig = &Config{
|
||||||
AppName: "beego",
|
AppName: "beego",
|
||||||
RunMode: DEV,
|
RunMode: DEV,
|
||||||
@ -195,10 +199,6 @@ func init() {
|
|||||||
|
|
||||||
// now only support ini, next will support json.
|
// now only support ini, next will support json.
|
||||||
func parseConfig(appConfigPath string) (err error) {
|
func parseConfig(appConfigPath string) (err error) {
|
||||||
if workPath != AppPath {
|
|
||||||
os.Chdir(AppPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
AppConfig, err = newAppConfig(AppConfigProvider, appConfigPath)
|
AppConfig, err = newAppConfig(AppConfigProvider, appConfigPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user