mirror of
https://github.com/distribution/distribution.git
synced 2025-09-24 12:37:00 +00:00
Expose DomainRegexp
from reference
This fix is based on: https://github.com/docker/docker/pull/30746#discussion_r99650885 The goal is to reuse the `DomainRegexp` in docker to check for `<host>:<port>` pattern. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -116,7 +116,7 @@ func TestDomainRegexp(t *testing.T) {
|
||||
match: true,
|
||||
},
|
||||
}
|
||||
r := regexp.MustCompile(`^` + domainRegexp.String() + `$`)
|
||||
r := regexp.MustCompile(`^` + DomainRegexp.String() + `$`)
|
||||
for i := range hostcases {
|
||||
checkRegexp(t, r, hostcases[i])
|
||||
}
|
||||
|
Reference in New Issue
Block a user