Skip to content

Commit

Permalink
fix: add helper texts for create command
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed May 7, 2024
1 parent 9a280a0 commit 0e8653f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions cmd/docs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ func mapCommandInfos(cmds []*cobra.Command) []CommandInfo {
})
})

if c.Short != "" {
infos = append(infos, info)
}

if c.HasSubCommands() {
subInfos := mapCommandInfos(c.Commands())
for i := range subInfos {
Expand All @@ -140,6 +136,8 @@ func mapCommandInfos(cmds []*cobra.Command) []CommandInfo {
}

infos = append(infos, subInfos...)
} else {
infos = append(infos, info)
}
}

Expand Down
4 changes: 3 additions & 1 deletion internal/cli/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import (

func NewCreateCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "create",
Use: "create",
Short: "Create a new recipe, manifest or test",
Long: "Create a new recipe, manifest or test.",
}

cmd.AddCommand(
Expand Down

0 comments on commit 0e8653f

Please sign in to comment.