github.com/kubeshop/testkube@v1.17.23/cmd/kubectl-testkube/commands/context/get.go (about) 1 package context 2 3 import ( 4 "github.com/spf13/cobra" 5 6 "github.com/kubeshop/testkube/cmd/kubectl-testkube/commands/common" 7 "github.com/kubeshop/testkube/cmd/kubectl-testkube/config" 8 "github.com/kubeshop/testkube/pkg/ui" 9 ) 10 11 func NewGetContextCmd() *cobra.Command { 12 13 cmd := &cobra.Command{ 14 Use: "context <value>", 15 Short: "Set context for Testkube Pro", 16 Run: func(cmd *cobra.Command, args []string) { 17 18 cfg, err := config.Load() 19 ui.ExitOnError("loading config file", err) 20 21 ui.NL() 22 common.UiPrintContext(cfg) 23 }, 24 } 25 26 return cmd 27 }