a1f6039d by 傅小黑

gofmt code

1 parent 0183608a
...@@ -53,7 +53,7 @@ func (c *JsonConfigContainer) Bool(key string) (bool, error) { ...@@ -53,7 +53,7 @@ func (c *JsonConfigContainer) Bool(key string) (bool, error) {
53 } else { 53 } else {
54 return false, errors.New("not exist key:" + key) 54 return false, errors.New("not exist key:" + key)
55 } 55 }
56 return false,nil 56 return false, nil
57 } 57 }
58 58
59 // Int returns the integer value for a given key. 59 // Int returns the integer value for a given key.
...@@ -68,7 +68,7 @@ func (c *JsonConfigContainer) Int(key string) (int, error) { ...@@ -68,7 +68,7 @@ func (c *JsonConfigContainer) Int(key string) (int, error) {
68 } else { 68 } else {
69 return 0, errors.New("not exist key:" + key) 69 return 0, errors.New("not exist key:" + key)
70 } 70 }
71 return 0,nil 71 return 0, nil
72 } 72 }
73 73
74 // Int64 returns the int64 value for a given key. 74 // Int64 returns the int64 value for a given key.
...@@ -83,7 +83,7 @@ func (c *JsonConfigContainer) Int64(key string) (int64, error) { ...@@ -83,7 +83,7 @@ func (c *JsonConfigContainer) Int64(key string) (int64, error) {
83 } else { 83 } else {
84 return 0, errors.New("not exist key:" + key) 84 return 0, errors.New("not exist key:" + key)
85 } 85 }
86 return 0,nil 86 return 0, nil
87 } 87 }
88 88
89 // Float returns the float value for a given key. 89 // Float returns the float value for a given key.
...@@ -98,7 +98,7 @@ func (c *JsonConfigContainer) Float(key string) (float64, error) { ...@@ -98,7 +98,7 @@ func (c *JsonConfigContainer) Float(key string) (float64, error) {
98 } else { 98 } else {
99 return 0.0, errors.New("not exist key:" + key) 99 return 0.0, errors.New("not exist key:" + key)
100 } 100 }
101 return 0.0,nil 101 return 0.0, nil
102 } 102 }
103 103
104 // String returns the string value for a given key. 104 // String returns the string value for a given key.
...@@ -132,7 +132,7 @@ func (c *JsonConfigContainer) DIY(key string) (v interface{}, err error) { ...@@ -132,7 +132,7 @@ func (c *JsonConfigContainer) DIY(key string) (v interface{}, err error) {
132 } else { 132 } else {
133 return nil, errors.New("not exist key") 133 return nil, errors.New("not exist key")
134 } 134 }
135 return nil,nil 135 return nil, nil
136 } 136 }
137 137
138 // section.key or key 138 // section.key or key
......
1
2 package config 1 package config
3 2
4 import ( 3 import (
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!