Sub -> Subcommand
Juan Batiz-Benet committed
Oct 20, 2014 at 07:55 UTC
92528ba7642abcfc6754c7b68b435e65db2e7d31
2 files changed
+4
-4
commands/cli/parse.go
+1
-1
@@ -33,7 +33,7 @@ func parsePath(input []string, root *commands.Command) ([]string, []string, erro
33
break
34
}
35
36
- cmd := cmd.Sub(blob)
36
+ cmd := cmd.Subcommand(blob)
37
if cmd == nil {
38
break
39
}
commands/command.go
+3
-3
@@ -82,7 +82,7 @@ func (c *Command) Resolve(path []string) ([]*Command, error) {
82
83
cmd := c
84
for i, name := range path {
85
- cmd = cmd.Sub(name)
85
+ cmd = cmd.Subcommand(name)
86
87
if cmd == nil {
88
pathS := strings.Join(path[0:i], "/")
@@ -128,8 +128,8 @@ func (c *Command) GetOptions(path []string) (map[string]Option, error) {
128
return optionsMap, nil
129
}
130
131
-// Sub returns the subcommand with the given id
132
-func (c *Command) Sub(id string) *Command {
131
+// Subcommand returns the subcommand with the given id
132
+func (c *Command) Subcommand(id string) *Command {
133
return c.subcommands[id]
134
}
135