@cryptotaxi247 / kubo / commits / f93b806d2

commands/http: s/lenRequired/numRequired/

Matt Bell committed Nov 11, 2014 at 17:43 UTC f93b806d21bc204288b8d3c715b6374d3de9af75
1 file changed +4 -4
commands/http/parse.go
+4 -4
@@ -42,10 +42,10 @@ func Parse(r *http.Request, root *cmds.Command) (cmds.Request, error) {
42 args := make([]interface{}, 0)
43
44 // count required argument definitions
45 - lenRequired := 0
45 + numRequired := 0
46 for _, argDef := range cmd.Arguments {
47 if argDef.Required {
48 - lenRequired++
48 + numRequired++
49 }
50 }
51
@@ -58,10 +58,10 @@ func Parse(r *http.Request, root *cmds.Command) (cmds.Request, error) {
58
59 for _, argDef := range cmd.Arguments {
60 // skip optional argument definitions if there aren't sufficient remaining values
61 - if valCount <= lenRequired && !argDef.Required {
61 + if valCount <= numRequired && !argDef.Required {
62 continue
63 } else if argDef.Required {
64 - lenRequired--
64 + numRequired--
65 }
66
67 if argDef.Type == cmds.ArgString {