fix lint: add comment for NameRegex and error

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg 2020-01-08 13:55:14 +01:00
parent 8ae672632b
commit baba52c6b5
1 changed files with 2 additions and 0 deletions

View File

@ -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_.-]*")
)