mirror of https://github.com/docker/cli.git
cli: NewTopLevelCommand: don't use unnamed assignments
This prevents unexpected bugs if fields are added/moved. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
81c68913e4
commit
36441fc5f6
|
@ -116,7 +116,13 @@ type TopLevelCommand struct {
|
|||
|
||||
// NewTopLevelCommand returns a new TopLevelCommand object
|
||||
func NewTopLevelCommand(cmd *cobra.Command, dockerCli *command.DockerCli, opts *cliflags.ClientOptions, flags *pflag.FlagSet) *TopLevelCommand {
|
||||
return &TopLevelCommand{cmd, dockerCli, opts, flags, os.Args[1:]}
|
||||
return &TopLevelCommand{
|
||||
cmd: cmd,
|
||||
dockerCli: dockerCli,
|
||||
opts: opts,
|
||||
flags: flags,
|
||||
args: os.Args[1:],
|
||||
}
|
||||
}
|
||||
|
||||
// SetArgs sets the args (default os.Args[:1] used to invoke the command
|
||||
|
|
Loading…
Reference in New Issue