f733b570 by fuxiaohei

code style simplify

1 parent 9d0798ed
...@@ -145,7 +145,10 @@ func (c *JsonConfigContainer) getdata(key string) interface{} { ...@@ -145,7 +145,10 @@ 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 if !ok {
150 return nil
151 }
149 for _, key := range sectionKey[1:] { 152 for _, key := range sectionKey[1:] {
150 if v, ok := curValue.(map[string]interface{}); ok { 153 if v, ok := curValue.(map[string]interface{}); ok {
151 if v2, ok := v[key]; ok { 154 if v2, ok := v[key]; ok {
...@@ -153,7 +156,6 @@ func (c *JsonConfigContainer) getdata(key string) interface{} { ...@@ -153,7 +156,6 @@ func (c *JsonConfigContainer) getdata(key string) interface{} {
153 } 156 }
154 } 157 }
155 } 158 }
156 }
157 return nil 159 return nil
158 } 160 }
159 if v, ok := c.data[key]; ok { 161 if v, ok := c.data[key]; ok {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!