CalledAs returns the command name or alias that was used to invoke this command or an empty string if the command has not been called.
()
| 1560 | // CalledAs returns the command name or alias that was used to invoke |
| 1561 | // this command or an empty string if the command has not been called. |
| 1562 | func (c *Command) CalledAs() string { |
| 1563 | if c.commandCalledAs.called { |
| 1564 | return c.commandCalledAs.name |
| 1565 | } |
| 1566 | return "" |
| 1567 | } |
| 1568 | |
| 1569 | // hasNameOrAliasPrefix returns true if the Name or any of aliases start |
| 1570 | // with prefix |
no outgoing calls