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:
parent
b1993c9530
commit
95daa793b8
2 changed files with 6 additions and 6 deletions
|
@ -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])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue