mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
review code about cmd/* and fix some easy typos :D
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
This commit is contained in:
parent
7efc286518
commit
437e81cd69
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -111,7 +111,7 @@ func (l *MalformedHostHeaderOverrideConn) Read(b []byte) (n int, err error) {
|
|||
}
|
||||
|
||||
// Accept makes the listener accepts connections and wraps the connection
|
||||
// in a MalformedHostHeaderOverrideConn initilizing first to true.
|
||||
// in a MalformedHostHeaderOverrideConn initializing first to true.
|
||||
func (l *MalformedHostHeaderOverride) Accept() (net.Conn, error) {
|
||||
c, err := l.Listener.Accept()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue