1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 20:51:29 +00:00

fix testing fail

This commit is contained in:
fuxiaohei 2014-07-17 16:48:10 +08:00
parent c372328f88
commit 38188098c5

View File

@ -151,12 +151,12 @@ func (c *JsonConfigContainer) getData(key string) interface{} {
} }
for _, key := range sectionKey[1:] { for _, key := range sectionKey[1:] {
if v, ok := curValue.(map[string]interface{}); ok { if v, ok := curValue.(map[string]interface{}); ok {
if v2, ok := v[key]; ok { if curValue, ok = v[key]; !ok {
return v2 return nil
} }
} }
} }
return nil return curValue
} }
if v, ok := c.data[key]; ok { if v, ok := c.data[key]; ok {
return v return v