From 6be06a3db2194e0821eec6f6e9bf78c71e360ddc Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 11 Jan 2018 18:30:50 +0100 Subject: [PATCH] Fix docs YAML generation setting "kubernetes" for "swarm" Due to a copy/paste error, commands annotated with "swarm" were incorrectly setting the "kubernetes" property. Signed-off-by: Sebastiaan van Stijn --- docs/yaml/yaml.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/yaml/yaml.go b/docs/yaml/yaml.go index d909e45336..8e42e25d8f 100644 --- a/docs/yaml/yaml.go +++ b/docs/yaml/yaml.go @@ -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)