Simplify repository name component regexp
This commit is contained in:
parent
145c89bb94
commit
15c651b732
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ import (
|
||||||
// RepositoryNameComponentRegexp restricts registtry path components names to
|
// RepositoryNameComponentRegexp restricts registtry path components names to
|
||||||
// start with at least two letters or numbers, with following parts able to
|
// start with at least two letters or numbers, with following parts able to
|
||||||
// separated by one period, dash or underscore.
|
// separated by one period, dash or underscore.
|
||||||
var RepositoryNameComponentRegexp = regexp.MustCompile(`[a-z0-9](?:[a-z0-9]+[._-]?)*[a-z0-9]`)
|
var RepositoryNameComponentRegexp = regexp.MustCompile(`[a-z0-9]{2,}(?:[._-][a-z0-9]+)*`)
|
||||||
|
|
||||||
// RepositoryNameRegexp builds on RepositoryNameComponentRegexp to allow 2 to
|
// RepositoryNameRegexp builds on RepositoryNameComponentRegexp to allow 2 to
|
||||||
// 5 path components, separated by a forward slash.
|
// 5 path components, separated by a forward slash.
|
||||||
|
|
Loading…
Reference in a new issue