AddTips appends tips to a command (merges with existing).
(cmd *cobra.Command, tips ...string)
| 25 | |
| 26 | // AddTips appends tips to a command (merges with existing). |
| 27 | func AddTips(cmd *cobra.Command, tips ...string) { |
| 28 | existing := GetTips(cmd) |
| 29 | SetTips(cmd, append(existing, tips...)) |
| 30 | } |
| 31 | |
| 32 | // GetTips retrieves the tips from a command's annotations. |
| 33 | func GetTips(cmd *cobra.Command) []string { |