From 38188098c5da845a1b19d744011760f9fc93aecf Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Thu, 17 Jul 2014 16:48:10 +0800 Subject: [PATCH] fix testing fail --- config/json.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/json.go b/config/json.go index 12b92e7d..7214a686 100644 --- a/config/json.go +++ b/config/json.go @@ -151,12 +151,12 @@ func (c *JsonConfigContainer) getData(key string) interface{} { } for _, key := range sectionKey[1:] { if v, ok := curValue.(map[string]interface{}); ok { - if v2, ok := v[key]; ok { - return v2 + if curValue, ok = v[key]; !ok { + return nil } } } - return nil + return curValue } if v, ok := c.data[key]; ok { return v