builder/remotecontext: use net/url instead of urlutil
urlutil.IsUrl() was merely checking if the url had a http(s):// prefix, which is just as well handled through using url.Parse() Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -24,6 +24,14 @@ func TestParseRemoteURL(t *testing.T) {
|
||||
url string
|
||||
expected gitRepo
|
||||
}{
|
||||
{
|
||||
doc: "git scheme uppercase, no url-fragment",
|
||||
url: "GIT://github.com/user/repo.git",
|
||||
expected: gitRepo{
|
||||
remote: "git://github.com/user/repo.git",
|
||||
ref: "master",
|
||||
},
|
||||
},
|
||||
{
|
||||
doc: "git scheme, no url-fragment",
|
||||
url: "git://github.com/user/repo.git",
|
||||
|
||||
Reference in New Issue
Block a user