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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user