diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-12-17 14:46:15 +0100 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-01-12 17:07:30 +0100 |
commit | 495884b3195de482dc610a2a002db7e053188a32 (patch) | |
tree | 2a6f23db066cd52aa366991b0b34d7b919368ddc /libpod/define/config.go | |
parent | 2cdab5d53923784e72020d70ee9375518f19f9b6 (diff) | |
download | podman-495884b3195de482dc610a2a002db7e053188a32.tar.gz podman-495884b3195de482dc610a2a002db7e053188a32.tar.bz2 podman-495884b3195de482dc610a2a002db7e053188a32.zip |
use libnetwork from c/common
The libpod/network packages were moved to c/common so that buildah can
use it as well. To prevent duplication use it in podman as well and
remove it from here.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/define/config.go')
-rw-r--r-- | libpod/define/config.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/define/config.go b/libpod/define/config.go index a5cf07afc..0181bd31c 100644 --- a/libpod/define/config.go +++ b/libpod/define/config.go @@ -5,7 +5,7 @@ import ( "io" "regexp" - "github.com/pkg/errors" + "github.com/containers/common/libnetwork/types" ) var ( @@ -17,9 +17,9 @@ 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_.-]*$") + NameRegex = types.NameRegex // RegexError is thrown in presence of an invalid container/pod name. - RegexError = errors.Wrapf(ErrInvalidArg, "names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*") + RegexError = types.RegexError // UmaskRegex is a regular expression to validate Umask. UmaskRegex = regexp.MustCompile(`^[0-7]{1,4}$`) ) |