From 583dd837278ab8999a45ba9be109f706d57485ae Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Tue, 8 Nov 2016 07:06:07 -0800 Subject: [PATCH] Remove `-ptr` from the help output of `service create` This fix is based on the comment: https://github.com/docker/docker/pull/28147#discussion_r86996347 Previously the output string of the `DurationOpt` is `duration-ptr` and `Uint64Opt` is `uint64-ptr`. While it is clear to developers, for a normal user `-ptr` might not be very informative. On the other hand, the default value of `DurationOpt` and `Uint64Opt` has already been quite informative: `none`. That means if no flag provided, the value will be treated as none. (like a ptr with nil as the default) For that reason this fix removes the `-ptr`. Also, the output in the docs of `service create` has been quite out-of-sync with the true output. So this fix updates the docs to have the most up-to-date help output of `service create --help`. This fix is related to #28147. Signed-off-by: Yong Tang --- opts/opts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opts/opts.go b/opts/opts.go index e452943ffc..0ac391add8 100644 --- a/opts/opts.go +++ b/opts/opts.go @@ -345,7 +345,7 @@ func (c *NanoCPUs) Set(value string) error { // Type returns the type func (c *NanoCPUs) Type() string { - return "NanoCPUs" + return "decimal" } // Value returns the value in int64