(w io.Writer, cmd *cobra.Command)
| 16 | ) |
| 17 | |
| 18 | func printJSONFields(w io.Writer, cmd *cobra.Command) { |
| 19 | raw, ok := cmd.Annotations["help:json-fields"] |
| 20 | if !ok { |
| 21 | return |
| 22 | } |
| 23 | |
| 24 | fmt.Fprint(w, "### JSON Fields\n\n") |
| 25 | fmt.Fprint(w, text.FormatSlice(strings.Split(raw, ","), 0, 0, "`", "`", true)) |
| 26 | fmt.Fprint(w, "\n\n") |
| 27 | } |
| 28 | |
| 29 | func printAliases(w io.Writer, cmd *cobra.Command) { |
| 30 | if len(cmd.Aliases) > 0 { |
no test coverage detected