summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-03-23 16:18:17 -0400
committerMatthew Heon <mheon@redhat.com>2020-03-26 13:33:33 -0400
commite42cbdd1b2f6788a814d6aa1838111989cd424ad (patch)
tree5705b12daaa8324c659717e72dfa523f83f5785b /libpod/options.go
parent0c40b62c77d8f7dba8e73ac3ced0de536ec220d5 (diff)
downloadpodman-e42cbdd1b2f6788a814d6aa1838111989cd424ad.tar.gz
podman-e42cbdd1b2f6788a814d6aa1838111989cd424ad.tar.bz2
podman-e42cbdd1b2f6788a814d6aa1838111989cd424ad.zip
Add bindings for Container Exec Create + Inspect
Also adds some basic tests for these two. More tests are needed but will have to wait for state to be finished. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 9b61d7947..74f9c485e 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -21,6 +21,8 @@ import (
var (
// NameRegex is a regular expression to validate container/pod names.
+ // This must NOT be changed from outside of Libpod. It should be a
+ // constant, but Go won't let us do that.
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_.-]*")