Merge component 'cli' from git@github.com:docker/cli master

This commit is contained in:
GordonTheTurtle
2018-01-12 16:41:09 +00:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -21,9 +21,9 @@ const (
func normalize(flag string) Orchestrator {
switch flag {
case "kubernetes", "k8s":
case "kubernetes":
return OrchestratorKubernetes
case "swarm", "swarmkit":
case "swarm":
return OrchestratorSwarm
default:
return orchestratorUnset
+2 -2
View File
@@ -123,7 +123,7 @@ func GenYamlCustom(cmd *cobra.Command, w io.Writer) error {
cliDoc.Kubernetes = true
}
if _, ok := curr.Annotations["swarm"]; ok && !cliDoc.Swarm {
cliDoc.Kubernetes = true
cliDoc.Swarm = true
}
}
@@ -208,7 +208,7 @@ func genFlagResult(flags *pflag.FlagSet) []cmdOption {
opt.Kubernetes = true
}
if _, ok := flag.Annotations["swarm"]; ok {
opt.Kubernetes = true
opt.Swarm = true
}
result = append(result, opt)