@cryptotaxi247 / kubo / commits / eedc2e9cc

commands: s/lenRequired/numRequired/

Matt Bell committed Nov 11, 2014 at 16:48 UTC eedc2e9cc742cf6099b8c3d441733464102ab56f
1 file changed +3 -3
commands/command.go
+3 -3
@@ -159,10 +159,10 @@ func (c *Command) CheckArguments(req Request) error {
159 }
160
161 // count required argument definitions
162 - lenRequired := 0
162 + numRequired := 0
163 for _, argDef := range c.Arguments {
164 if argDef.Required {
165 - lenRequired++
165 + numRequired++
166 }
167 }
168
@@ -170,7 +170,7 @@ func (c *Command) CheckArguments(req Request) error {
170 j := 0
171 for _, argDef := range c.Arguments {
172 // skip optional argument definitions if there aren't sufficient remaining values
173 - if len(args)-j <= lenRequired && !argDef.Required {
173 + if len(args)-j <= numRequired && !argDef.Required {
174 continue
175 }
176