summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-01-08 13:55:14 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-01-08 13:55:14 +0100
commitbaba52c6b585e6ca8c618c41072fcbb241a0b419 (patch)
tree4defebfa3a36cf2b2e605ad66727cc5c049996b1 /libpod
parent8ae672632b36bce993860e782048dc72fab1662c (diff)
downloadpodman-baba52c6b585e6ca8c618c41072fcbb241a0b419.tar.gz
podman-baba52c6b585e6ca8c618c41072fcbb241a0b419.tar.bz2
podman-baba52c6b585e6ca8c618c41072fcbb241a0b419.zip
fix lint: add comment for NameRegex and error
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/options.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index ebde4eecc..7ee9c9b56 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -20,7 +20,9 @@ import (
)
var (
+ // NameRegex is a regular expression to validate container/pod names.
NameRegex = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
+ // RegexError is thrown in presence of an invalid container/pod name.
RegexError = errors.Wrapf(define.ErrInvalidArg, "names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*")
)