feat: add 'ctx ls' command to list available cluster contexts in config

This commit is contained in:
Pavel Sviderski committed 2025-04-02 09:25:12 +10:00
1 parent f467fad84c
commit 1bbefdd0d2
7 files changed
+117 -29

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package context
import (
"github.com/spf13/cobra"
)
func NewRootCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "context",
Aliases: []string{"ctx"},
Short: "Switch between different cluster contexts. Contains subcommands to manage contexts.",
RunE: func(cmd *cobra.Command, args []string) error {
// TODO
return nil
},
}
cmd.AddCommand(
NewListCommand(),
)
return cmd
}