diff options
Diffstat (limited to 'cmd/podman/common.go')
-rw-r--r-- | cmd/podman/common.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go index ae4bbd65d..921f30b84 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -22,7 +22,10 @@ var ( } ) -const crioConfigPath = "/etc/crio/crio.conf" +const ( + crioConfigPath = "/etc/crio/crio.conf" + idTruncLength = 12 +) func getRuntime(c *cli.Context) (*libpod.Runtime, error) { @@ -88,6 +91,13 @@ func splitCamelCase(src string) string { return strings.Join(entries, " ") } +func shortID(id string) string { + if len(id) > idTruncLength { + return id[:idTruncLength] + } + return id +} + // validateFlags searches for StringFlags or StringSlice flags that never had // a value set. This commonly occurs when the CLI mistakenly takes the next // option and uses it as a value. |