1
0
Эх сурвалжийг харах

Remove go template from help on list commands

Signed-off-by: Ulysses Souza <[email protected]>
Ulysses Souza 5 жил өмнө
parent
commit
044e7f571d

+ 2 - 2
cli/cmd/context/ls.go

@@ -58,7 +58,7 @@ func listCommand() *cobra.Command {
 	}
 	cmd.Flags().BoolVarP(&opts.quiet, "quiet", "q", false, "Only show context names")
 	cmd.Flags().BoolVar(&opts.json, "json", false, "Format output as JSON")
-	cmd.Flags().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json | go template]. (Default: pretty)")
+	cmd.Flags().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json]. (Default: pretty)")
 	_ = cmd.Flags().MarkHidden("json")
 
 	return cmd
@@ -104,7 +104,7 @@ func runList(cmd *cobra.Command, opts lsOpts) error {
 				if c.Name == currentContext {
 					contextName += " *"
 				}
-				fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\n",
+				_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\n",
 					contextName,
 					c.Type(),
 					c.Metadata.Description,

+ 1 - 1
cli/cmd/ps.go

@@ -53,7 +53,7 @@ func PsCommand() *cobra.Command {
 	cmd.Flags().BoolVarP(&opts.quiet, "quiet", "q", false, "Only display IDs")
 	cmd.Flags().BoolVarP(&opts.all, "all", "a", false, "Show all containers (default shows just running)")
 	cmd.Flags().BoolVar(&opts.json, "json", false, "Format output as JSON")
-	cmd.Flags().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json | go template]. (Default: pretty)")
+	cmd.Flags().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json]. (Default: pretty)")
 	_ = cmd.Flags().MarkHidden("json")
 
 	return cmd

+ 1 - 2
cli/cmd/version.go

@@ -42,8 +42,7 @@ func VersionCommand(version string) *cobra.Command {
 	}
 	// define flags for backward compatibility with com.docker.cli
 	flags := cmd.Flags()
-	flags.StringP(formatOpt, "f", "", "Format the output using the given Go template")
-	// flags.String(&opts.format, "format", "", "Format the output. Values: [pretty | json | go template]. (Default: pretty)")
+	flags.StringP(formatOpt, "f", "", "Format the output. Values: [pretty | json]. (Default: pretty)")
 	flags.String("kubeconfig", "", "Kubernetes config file")
 	mobyflags.AddMobyFlagsForRetrocompatibility(flags)