Browse code

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

Remove dead code for "inspect --pretty"

Tibor Vass authored on 2016/07/14 06:46:42
Showing 1 changed files
... ...
@@ -11,7 +11,6 @@ import (
11 11
 
12 12
 type inspectOptions struct {
13 13
 	format string
14
-	//	pretty  bool
15 14
 }
16 15
 
17 16
 func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
... ...
@@ -22,16 +21,12 @@ func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
22 22
 		Short: "Inspect the Swarm",
23 23
 		Args:  cli.NoArgs,
24 24
 		RunE: func(cmd *cobra.Command, args []string) error {
25
-			// if opts.pretty && len(opts.format) > 0 {
26
-			//	return fmt.Errorf("--format is incompatible with human friendly format")
27
-			// }
28 25
 			return runInspect(dockerCli, opts)
29 26
 		},
30 27
 	}
31 28
 
32 29
 	flags := cmd.Flags()
33 30
 	flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template")
34
-	//flags.BoolVarP(&opts.pretty, "pretty", "h", false, "Print the information in a human friendly format.")
35 31
 	return cmd
36 32
 }
37 33
 
... ...
@@ -48,9 +43,5 @@ func runInspect(dockerCli *client.DockerCli, opts inspectOptions) error {
48 48
 		return swarm, nil, nil
49 49
 	}
50 50
 
51
-	//	if !opts.pretty {
52 51
 	return inspect.Inspect(dockerCli.Out(), []string{""}, opts.format, getRef)
53
-	//	}
54
-
55
-	//return printHumanFriendly(dockerCli.Out(), opts.refs, getRef)
56 52
 }