From 0d8fd8584279cbcfaa090da96404ef4a6f8c8993 Mon Sep 17 00:00:00 2001 From: "Aaron.L.Xu" Date: Fri, 10 Feb 2017 15:35:05 +0800 Subject: [PATCH] review code about cmd/* and fix some easy typos :D Signed-off-by: Aaron.L.Xu --- docker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker.go b/docker.go index f992b08469..654c7f41d6 100644 --- a/docker.go +++ b/docker.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "os" + "strings" "github.com/Sirupsen/logrus" "github.com/docker/docker/api/types/versions" @@ -17,7 +18,6 @@ import ( "github.com/docker/docker/pkg/term" "github.com/spf13/cobra" "github.com/spf13/pflag" - "strings" ) func newDockerCommand(dockerCli *command.DockerCli) *cobra.Command { @@ -55,7 +55,7 @@ func newDockerCommand(dockerCli *command.DockerCli) *cobra.Command { cli.SetupRootCommand(cmd) cmd.SetHelpFunc(func(ccmd *cobra.Command, args []string) { - if dockerCli.Client() == nil { // when using --help, PersistenPreRun is not called, so initialization is needed. + if dockerCli.Client() == nil { // when using --help, PersistentPreRun is not called, so initialization is needed. // flags must be the top-level command flags, not cmd.Flags() opts.Common.SetDefaultOptions(flags) dockerPreRun(opts)