mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-10 17:48:25 +08:00
20 lines
356 B
Go
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)
|
|
}
|