Don't actually hit dl site (#1)
continuous-integration/drone/push Build is passing Details

Reviewed-on: #1
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2021-08-09 03:06:59 +00:00
parent 4d2af9ae20
commit b561b7c7ca
No known key found for this signature in database
GPG Key ID: 454E7F878890995A
2 changed files with 2 additions and 2 deletions

2
dl.go
View File

@ -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 {

View File

@ -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 {