JMS #4: Command.HasName

This commit is contained in:
Jeremy Saenz
2013-07-18 19:30:18 -07:00
parent 4495e2e996
commit c15c42a7a8
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -14,3 +14,7 @@ func (command Command) Run(c *Context) {
set.Parse(c.Args()[1:])
command.Action(NewContext(set, c.globalSet))
}
func (command Command) HasName(name string) bool {
return command.Name == name || command.ShortName == name
}