diff options
author | Marco Vedovati <mvedovati@suse.com> | 2019-08-30 15:55:59 +0200 |
---|---|---|
committer | Marco Vedovati <mvedovati@suse.com> | 2019-09-05 11:13:39 +0200 |
commit | 5711aabb4d9d705a09085eb6e324ee5dae8ed487 (patch) | |
tree | dbb880281629e27f8197417d293fc2b51df08881 /cmd/podman/common.go | |
parent | e74fcd73357954fe5a0b027cf195c04345703985 (diff) | |
download | podman-5711aabb4d9d705a09085eb6e324ee5dae8ed487.tar.gz podman-5711aabb4d9d705a09085eb6e324ee5dae8ed487.tar.bz2 podman-5711aabb4d9d705a09085eb6e324ee5dae8ed487.zip |
cli-flags: use a consistent format for <size><unit>
Use a consistent format for description of the <size><unit> flags.
Also, avoid backticks for /dev/shm, as that's interpreted as the format
by the flag parsing lib.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Diffstat (limited to 'cmd/podman/common.go')
-rw-r--r-- | cmd/podman/common.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go index 32478bb51..9724d18c6 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -22,7 +22,8 @@ var ( ) const ( - idTruncLength = 12 + idTruncLength = 12 + sizeWithUnitFormat = "(format: `<number>[<unit>]`, where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))" ) func splitCamelCase(src string) string { @@ -302,7 +303,7 @@ func getCreateFlags(c *cliconfig.PodmanCommand) { ) createFlags.String( "kernel-memory", "", - "Kernel memory limit (format: `<number>[<unit>]`, where unit = b, k, m or g)", + "Kernel memory limit "+sizeWithUnitFormat, ) createFlags.StringArrayP( "label", "l", []string{}, @@ -326,11 +327,11 @@ func getCreateFlags(c *cliconfig.PodmanCommand) { ) createFlags.StringP( "memory", "m", "", - "Memory limit (format: <number>[<unit>], where unit = b, k, m or g)", + "Memory limit "+sizeWithUnitFormat, ) createFlags.String( "memory-reservation", "", - "Memory soft limit (format: <number>[<unit>], where unit = b, k, m or g)", + "Memory soft limit "+sizeWithUnitFormat, ) createFlags.String( "memory-swap", "", @@ -422,7 +423,7 @@ func getCreateFlags(c *cliconfig.PodmanCommand) { ) createFlags.String( "shm-size", cliconfig.DefaultShmSize, - "Size of `/dev/shm`. The format is `<number><unit>`", + "Size of /dev/shm "+sizeWithUnitFormat, ) createFlags.String( "stop-signal", "", |