f733b570 by fuxiaohei

code style simplify

1 parent 9d0798ed
...@@ -145,12 +145,14 @@ func (c *JsonConfigContainer) getdata(key string) interface{} { ...@@ -145,12 +145,14 @@ func (c *JsonConfigContainer) getdata(key string) interface{} {
145 } 145 }
146 sectionKey := strings.Split(key, "::") 146 sectionKey := strings.Split(key, "::")
147 if len(sectionKey) >= 2 { 147 if len(sectionKey) >= 2 {
148 if curValue, ok := c.data[sectionKey[0]]; ok { 148 curValue, ok := c.data[sectionKey[0]]
149 for _, key := range sectionKey[1:] { 149 if !ok {
150 if v, ok := curValue.(map[string]interface{}); ok { 150 return nil
151 if v2, ok := v[key]; ok { 151 }
152 return v2 152 for _, key := range sectionKey[1:] {
153 } 153 if v, ok := curValue.(map[string]interface{}); ok {
154 if v2, ok := v[key]; ok {
155 return v2
154 } 156 }
155 } 157 }
156 } 158 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!