Split apart repository reference into domain and path

Allows having other parsers which are capable of unambiguously keeping domain and path separated in a Reference type.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2016-06-09 11:32:23 -07:00
parent 76f514b618
commit 9a43b8f696
No known key found for this signature in database
GPG key ID: F58C5D0A4405ACDB
4 changed files with 169 additions and 104 deletions

View file

@ -33,7 +33,7 @@ func checkRegexp(t *testing.T, r *regexp.Regexp, m regexpMatch) {
}
}
func TestHostRegexp(t *testing.T) {
func TestDomainRegexp(t *testing.T) {
hostcases := []regexpMatch{
{
input: "test.com",
@ -116,7 +116,7 @@ func TestHostRegexp(t *testing.T) {
match: true,
},
}
r := regexp.MustCompile(`^` + hostnameRegexp.String() + `$`)
r := regexp.MustCompile(`^` + domainRegexp.String() + `$`)
for i := range hostcases {
checkRegexp(t, r, hostcases[i])
}