cache command name

This commit is contained in:
Di Xu 2017-02-07 22:52:28 +08:00
parent 35136c09d8
commit a04b678370

View file

@ -969,7 +969,8 @@ func (c *Command) Name() string {
if i >= 0 { if i >= 0 {
name = name[:i] name = name[:i]
} }
return name c.name = name
return c.name
} }
// HasAlias determines if a given string is an alias of the command. // HasAlias determines if a given string is an alias of the command.