command returns the name of the (sub)command for which the hook was invoked.
()
| 63 | |
| 64 | // command returns the name of the (sub)command for which the hook was invoked. |
| 65 | func (c commandInfo) command() string { |
| 66 | if c.cmd == nil { |
| 67 | return "" |
| 68 | } |
| 69 | return c.cmd.Name() |
| 70 | } |
| 71 | |
| 72 | // flagValue returns the value that was set for the given flag when the hook was invoked. |
| 73 | func (c commandInfo) flagValue(flagName string) (string, error) { |