diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-03-27 16:26:36 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-03-31 08:50:32 -0400 |
commit | 3449b27cd1743a1353ea8c4503eec5d126d04b0d (patch) | |
tree | b4c65b7cbbc1307e6a4c021531f4b7a1e53b4c8d /cmd/podmanV2/utils/alias.go | |
parent | 9c7410d331ed6c9af50babb41314bfa67a3f39e0 (diff) | |
download | podman-3449b27cd1743a1353ea8c4503eec5d126d04b0d.tar.gz podman-3449b27cd1743a1353ea8c4503eec5d126d04b0d.tar.bz2 podman-3449b27cd1743a1353ea8c4503eec5d126d04b0d.zip |
Switch to using --time as opposed to --timeout to better match Docker.
We need to consistently use --time rather then --timeout throughout the code.
Fix locations where timeout defaults are not set correctly as well.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podmanV2/utils/alias.go')
-rw-r--r-- | cmd/podmanV2/utils/alias.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cmd/podmanV2/utils/alias.go b/cmd/podmanV2/utils/alias.go new file mode 100644 index 000000000..54b3c5e89 --- /dev/null +++ b/cmd/podmanV2/utils/alias.go @@ -0,0 +1,24 @@ +package utils + +import "github.com/spf13/pflag" + +// AliasFlags is a function to handle backwards compatability with old flags +func AliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName { + switch name { + case "healthcheck-command": + name = "health-cmd" + case "healthcheck-interval": + name = "health-interval" + case "healthcheck-retries": + name = "health-retries" + case "healthcheck-start-period": + name = "health-start-period" + case "healthcheck-timeout": + name = "health-timeout" + case "net": + name = "network" + case "timeout": + name = "time" + } + return pflag.NormalizedName(name) +} |