@cryptotaxi247 / kubo / commits / bff646fb2

fix(commands/optionvalue) don't shadow the return variable

NB: return variables are provided for clarity. Otherwise, it's not entirely clear that the bool is for _found_.

Brian Tiger Chow committed Nov 11, 2014 at 23:35 UTC bff646fb26548892958debaafeeef0270b431156
1 file changed +4 -4
commands/option.go
+4 -4
@@ -89,7 +89,7 @@ func (ov OptionValue) Bool() (value bool, found bool, err error) {
89 return val, ov.found, err
90 }
91
92 -func (ov OptionValue) Int() (val int, found bool, err error) {
92 +func (ov OptionValue) Int() (value int, found bool, err error) {
93 if !ov.found {
94 return 0, false, nil
95 }
@@ -100,7 +100,7 @@ func (ov OptionValue) Int() (val int, found bool, err error) {
100 return val, ov.found, err
101 }
102
103 -func (ov OptionValue) Uint() (val uint, found bool, err error) {
103 +func (ov OptionValue) Uint() (value uint, found bool, err error) {
104 if !ov.found {
105 return 0, false, nil
106 }
@@ -111,7 +111,7 @@ func (ov OptionValue) Uint() (val uint, found bool, err error) {
111 return val, ov.found, err
112 }
113
114 -func (ov OptionValue) Float() (val float64, found bool, err error) {
114 +func (ov OptionValue) Float() (value float64, found bool, err error) {
115 if !ov.found {
116 return 0, false, nil
117 }
@@ -122,7 +122,7 @@ func (ov OptionValue) Float() (val float64, found bool, err error) {
122 return val, ov.found, err
123 }
124
125 -func (ov OptionValue) String() (val string, found bool, err error) {
125 +func (ov OptionValue) String() (value string, found bool, err error) {
126 if !ov.found {
127 return "", false, nil
128 }