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

     1  package commands
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  
     6  	"github.com/kubeshop/testkube/cmd/kubectl-testkube/commands/context"
     7  	"github.com/kubeshop/testkube/pkg/ui"
     8  )
     9  
    10  func NewSetCmd() *cobra.Command {
    11  	cmd := &cobra.Command{
    12  		Use:         "set <resourceName>",
    13  		Aliases:     []string{"s"},
    14  		Short:       "Set resources",
    15  		Long:        `Set available resources, like context etc`,
    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  
    23  	cmd.AddCommand(context.NewSetContextCmd())
    24  
    25  	return cmd
    26  }