diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-08 16:58:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-08 16:58:50 +0100 |
commit | c6ad42a176c943aa96a8c053682196cd38fd6a1a (patch) | |
tree | ef71ccbda94462f1bee19e8153c361751813df8a /libpod/options.go | |
parent | 27caffbb240725255485deaaecd548663adbf1fd (diff) | |
parent | bcf5753276fcb7280924b46c7c49ef3e2388c9b0 (diff) | |
download | podman-c6ad42a176c943aa96a8c053682196cd38fd6a1a.tar.gz podman-c6ad42a176c943aa96a8c053682196cd38fd6a1a.tar.bz2 podman-c6ad42a176c943aa96a8c053682196cd38fd6a1a.zip |
Merge pull request #4816 from vrothberg/lint
Fix golint errors
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/options.go b/libpod/options.go index ebde4eecc..031f4f705 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -20,7 +20,9 @@ import ( ) var ( - NameRegex = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$") + // 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_.-]*") ) |