diff --git a/dl.go b/dl.go index 4a485e7..0d652bb 100644 --- a/dl.go +++ b/dl.go @@ -6,7 +6,7 @@ import ( "net/http" ) -const dlURL = "https://golang.org/dl/?mode=json" +var dlURL = "https://golang.org/dl/?mode=json" // Version is a Go version type Version struct { diff --git a/dl_test.go b/dl_test.go index bcab308..9421179 100644 --- a/dl_test.go +++ b/dl_test.go @@ -14,7 +14,7 @@ func TestVersions(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { _, _ = w.Write(dlResp) })) - http.DefaultClient = server.Client() + dlURL = server.URL versions, err := Versions(context.Background()) if err != nil {