Commit 92528ba7 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

Sub -> Subcommand

parent 84fa7bc4
......@@ -33,7 +33,7 @@ func parsePath(input []string, root *commands.Command) ([]string, []string, erro
break
}
cmd := cmd.Sub(blob)
cmd := cmd.Subcommand(blob)
if cmd == nil {
break
}
......
......@@ -82,7 +82,7 @@ func (c *Command) Resolve(path []string) ([]*Command, error) {
cmd := c
for i, name := range path {
cmd = cmd.Sub(name)
cmd = cmd.Subcommand(name)
if cmd == nil {
pathS := strings.Join(path[0:i], "/")
......@@ -128,8 +128,8 @@ func (c *Command) GetOptions(path []string) (map[string]Option, error) {
return optionsMap, nil
}
// Sub returns the subcommand with the given id
func (c *Command) Sub(id string) *Command {
// Subcommand returns the subcommand with the given id
func (c *Command) Subcommand(id string) *Command {
return c.subcommands[id]
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment