github.com/kubeshop/testkube@v1.17.23/cmd/kubectl-testkube/commands/generate.go (about)

     1  package commands
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  
     6  	"github.com/kubeshop/testkube/cmd/kubectl-testkube/commands/crds"
     7  	"github.com/kubeshop/testkube/cmd/kubectl-testkube/commands/generate"
     8  	"github.com/kubeshop/testkube/pkg/ui"
     9  )
    10  
    11  func NewGenerateCmd() *cobra.Command {
    12  	cmd := &cobra.Command{
    13  		Use:         "generate <resourceName>",
    14  		Aliases:     []string{},
    15  		Short:       "Generate resources commands",
    16  		Annotations: map[string]string{cmdGroupAnnotation: cmdGroupCommands},
    17  		Run: func(cmd *cobra.Command, args []string) {
    18  			err := cmd.Help()
    19  			ui.PrintOnError("Displaying help", err)
    20  		}}
    21  
    22  	cmd.AddCommand(crds.NewCRDTestsCmd())
    23  	cmd.AddCommand(generate.NewDocsCmd())
    24  
    25  	return cmd
    26  }