1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-01 05:00:18 +00:00

Update config suport environment variable logic

This commit is contained in:
ysqi
2016-03-12 14:32:39 +08:00
parent 86c7f1db9e
commit b2a06c5fa0
10 changed files with 240 additions and 219 deletions

View File

@ -25,15 +25,7 @@ type fakeConfigContainer struct {
}
func (c *fakeConfigContainer) getData(key string) string {
if len(key) == 0 {
return ""
}
v := c.data[strings.ToLower(key)]
if env, ok := Getenv(v); ok {
return env
}
return v
return c.data[strings.ToLower(key)]
}
func (c *fakeConfigContainer) Set(key, val string) error {