Переглянути джерело

Merge pull request #24592 from thaJeztah/remove-dead-code

Remove dead code for "inspect --pretty"
Tibor Vass 9 роки тому
батько
коміт
1c6a8715ab
1 змінених файлів з 0 додано та 9 видалено
  1. 0 9
      api/client/swarm/inspect.go

+ 0 - 9
api/client/swarm/inspect.go

@@ -11,7 +11,6 @@ import (
 
 type inspectOptions struct {
 	format string
-	//	pretty  bool
 }
 
 func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
@@ -22,16 +21,12 @@ func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
 		Short: "Inspect the Swarm",
 		Args:  cli.NoArgs,
 		RunE: func(cmd *cobra.Command, args []string) error {
-			// if opts.pretty && len(opts.format) > 0 {
-			//	return fmt.Errorf("--format is incompatible with human friendly format")
-			// }
 			return runInspect(dockerCli, opts)
 		},
 	}
 
 	flags := cmd.Flags()
 	flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template")
-	//flags.BoolVarP(&opts.pretty, "pretty", "h", false, "Print the information in a human friendly format.")
 	return cmd
 }
 
@@ -48,9 +43,5 @@ func runInspect(dockerCli *client.DockerCli, opts inspectOptions) error {
 		return swarm, nil, nil
 	}
 
-	//	if !opts.pretty {
 	return inspect.Inspect(dockerCli.Out(), []string{""}, opts.format, getRef)
-	//	}
-
-	//return printHumanFriendly(dockerCli.Out(), opts.refs, getRef)
 }