api: client: container: update: fix help text

Before:

$ docker update --cpu-period
Status: flag needs an argument: --cpu-period
See 'docker update --help'., Code: 125

After:

$ docker update --cpu-period
flag needs an argument: --cpu-period
See 'docker update --help'.

Also remove flagErrorFunc function which isn't needed anymore.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2016-08-31 12:43:01 +02:00
parent 4e7cbb91f8
commit c2c2617534
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9
2 changed files with 0 additions and 8 deletions

View file

@ -67,13 +67,6 @@ func NewRunCommand(dockerCli *client.DockerCli) *cobra.Command {
return cmd
}
func flagErrorFunc(cmd *cobra.Command, err error) error {
return cli.StatusError{
Status: cli.FlagErrorFunc(cmd, err).Error(),
StatusCode: 125,
}
}
func runRun(dockerCli *client.DockerCli, flags *pflag.FlagSet, opts *runOptions, copts *runconfigopts.ContainerOptions) error {
stdout, stderr, stdin := dockerCli.Out(), dockerCli.Err(), dockerCli.In()
client := dockerCli.Client()

View file

@ -46,7 +46,6 @@ func NewUpdateCommand(dockerCli *client.DockerCli) *cobra.Command {
return runUpdate(dockerCli, &opts)
},
}
cmd.SetFlagErrorFunc(flagErrorFunc)
flags := cmd.Flags()
flags.Uint16Var(&opts.blkioWeight, "blkio-weight", 0, "Block IO (relative weight), between 10 and 1000")