From baba52c6b585e6ca8c618c41072fcbb241a0b419 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 8 Jan 2020 13:55:14 +0100 Subject: fix lint: add comment for NameRegex and error Signed-off-by: Valentin Rothberg --- libpod/options.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libpod/options.go') 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_.-]*") ) -- cgit v1.2.3-54-g00ecf