Skip to content

Commit

Permalink
add colons to command group titles
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Jan 31, 2024
1 parent bacaaf7 commit af546fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/cmd/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ func ValidateRequiredFlags(flags *pflag.FlagSet, names ...string) error {

// AddGroup adds a group to the passed command and adds the passed commands to the group.
func AddGroup(cmd *cobra.Command, id string, title string, groupCmds ...*cobra.Command) {
if !strings.HasSuffix(title, ":") {
title += ":"
}
cmd.AddGroup(&cobra.Group{ID: id, Title: title})
for _, groupCmd := range groupCmds {
groupCmd.GroupID = id
Expand Down

0 comments on commit af546fe

Please sign in to comment.