Skip to content

Commit

Permalink
fix: use net package to build url string
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatyi committed Mar 8, 2019
1 parent 1b7745f commit 0273da2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ func (g *Gitlab) Open(url string) (source.Driver, error) {
}

if u.Host != "" {
err = gn.client.SetBaseURL("https://" + u.Host)
uri := nurl.URL{
Scheme: "https",
Host: u.Host,
}

err = gn.client.SetBaseURL(uri.String())
if err != nil {
return nil, ErrInvalidHost
}
Expand Down

0 comments on commit 0273da2

Please sign in to comment.