GetCluster get cluster from command flags
(cmd *cobra.Command)
| 83 | |
| 84 | // GetCluster get cluster from command flags |
| 85 | func GetCluster(cmd *cobra.Command) string { |
| 86 | cluster, err := cmd.Flags().GetString(flagCluster) |
| 87 | cmdutil.CheckErr(err) |
| 88 | if cluster == "" { |
| 89 | return types.ClusterLocalName |
| 90 | } |
| 91 | return cluster |
| 92 | } |
| 93 | |
| 94 | // GetClusters get cluster from command flags |
| 95 | func GetClusters(cmd *cobra.Command) []string { |