netmaker/cli/cmd/context/list.go
2022-11-28 18:16:56 +05:30

20 lines
356 B
Go

package context
import (
"github.com/gravitl/netmaker/cli/config"
"github.com/spf13/cobra"
)
var contextListCmd = &cobra.Command{
Use: "list",
Args: cobra.NoArgs,
Short: "List all contexts",
Long: `List all contexts`,
Run: func(cmd *cobra.Command, args []string) {
config.ListAll()
},
}
func init() {
rootCmd.AddCommand(contextListCmd)
}