diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-09 10:06:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-09 10:06:11 +0200 |
commit | d78521de11c524d7b8ceee02b726f66da6d3301c (patch) | |
tree | a0253ffa13b7c3793f156b6e5f35e12908211ebb /cmd/podman | |
parent | f500feb2f19b88592211841e4b30fe16a9aa30b3 (diff) | |
parent | 5711aabb4d9d705a09085eb6e324ee5dae8ed487 (diff) | |
download | podman-d78521de11c524d7b8ceee02b726f66da6d3301c.tar.gz podman-d78521de11c524d7b8ceee02b726f66da6d3301c.tar.bz2 podman-d78521de11c524d7b8ceee02b726f66da6d3301c.zip |
Merge pull request #3914 from marcov/units-opts
cli-flags: use a consistent format for <size><unit>
Diffstat (limited to 'cmd/podman')
-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", "", |