Files
gh-vanman2024-cli-builder-p…/skills/cobra-patterns/templates/nested-command.go.template
2025-11-30 09:04:14 +08:00

21 lines
556 B
Plaintext

package {{.PackageName}}
import (
"github.com/spf13/cobra"
)
// {{.CommandName}}Cmd represents the {{.CommandName}} parent command
var {{.CommandName}}Cmd = &cobra.Command{
Use: "{{.CommandName}}",
Short: "{{.ShortDescription}}",
Long: `{{.LongDescription}}`,
GroupID: "{{.GroupID}}",
}
func init() {
// Add subcommands here
// {{.CommandName}}Cmd.AddCommand({{.CommandName}}ListCmd)
// {{.CommandName}}Cmd.AddCommand({{.CommandName}}CreateCmd)
// {{.CommandName}}Cmd.AddCommand({{.CommandName}}DeleteCmd)
}