summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-04-01 19:45:23 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-05-03 10:36:16 -0400
commit7ba1b609aad678f458951c978455ea44c5b4d3ec (patch)
treecd9b6322c44fbb15579ff40f3ca33ea8d63285a1 /libpod/options.go
parent357e4c37e92e7426a66f1a1142a9650bb0d81ca0 (diff)
downloadpodman-7ba1b609aad678f458951c978455ea44c5b4d3ec.tar.gz
podman-7ba1b609aad678f458951c978455ea44c5b4d3ec.tar.bz2
podman-7ba1b609aad678f458951c978455ea44c5b4d3ec.zip
Move to using constants for valid restart policy types
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/options.go b/libpod/options.go
index e83515822..7ec7dfe63 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -1249,7 +1249,7 @@ func WithRestartPolicy(policy string) CtrCreateOption {
}
switch policy {
- case "", "no", "on-failure", "always":
+ case RestartPolicyNone, RestartPolicyNo, RestartPolicyOnFailure, RestartPolicyAlways:
ctr.config.RestartPolicy = policy
default:
return errors.Wrapf(ErrInvalidArg, "%q is not a valid restart policy", policy)