1
0
mirror of https://github.com/astaxie/beego.git synced 2025-02-16 23:17:06 +00:00

Add host env feature.

This commit is contained in:
Abel 2017-10-31 19:19:14 +08:00
parent 229d8b9530
commit 3504d2a4da

View File

@ -135,8 +135,8 @@ func init() {
panic(err) panic(err)
} }
var filename = "app.conf" var filename = "app.conf"
if os.Getenv("BEEGO_MODE") !=""{ if os.Getenv("BEEGO_MODE") != "" {
filename= os.Getenv("BEEGO_MODE")+".app.conf" filename = os.Getenv("BEEGO_MODE") + ".app.conf"
} }
appConfigPath = filepath.Join(workPath, "conf", filename) appConfigPath = filepath.Join(workPath, "conf", filename)
if !utils.FileExists(appConfigPath) { if !utils.FileExists(appConfigPath) {