list.go 356 B

1234567891011121314151617181920
  1. package context
  2. import (
  3. "github.com/gravitl/netmaker/cli/config"
  4. "github.com/spf13/cobra"
  5. )
  6. var contextListCmd = &cobra.Command{
  7. Use: "list",
  8. Args: cobra.NoArgs,
  9. Short: "List all contexts",
  10. Long: `List all contexts`,
  11. Run: func(cmd *cobra.Command, args []string) {
  12. config.ListAll()
  13. },
  14. }
  15. func init() {
  16. rootCmd.AddCommand(contextListCmd)
  17. }