diff --git a/io/transform/gsheet2csv/go.mod b/io/transform/gsheet2csv/go.mod index f57d483..430b1c1 100644 --- a/io/transform/gsheet2csv/go.mod +++ b/io/transform/gsheet2csv/go.mod @@ -1,3 +1,5 @@ module github.com/therootcompany/golib/io/transform/gsheet2csv -go 1.24.6 +go 1.26.5 + +require github.com/therootcompany/golib/https v0.9.0 // indirect diff --git a/io/transform/gsheet2csv/go.sum b/io/transform/gsheet2csv/go.sum new file mode 100644 index 0000000..f0731b1 --- /dev/null +++ b/io/transform/gsheet2csv/go.sum @@ -0,0 +1,2 @@ +github.com/therootcompany/golib/https v0.9.0 h1:D9gh0K6ljkvF805JUbylITn8SHPMo08q5PglQGXsK8c= +github.com/therootcompany/golib/https v0.9.0/go.mod h1:ilExqR/Uh7oB36oy9mwuNhANcFh+zdCfD3uJiZ11YAY= diff --git a/io/transform/gsheet2csv/gsheet2csv.go b/io/transform/gsheet2csv/gsheet2csv.go index ac9d962..b48ab5c 100644 --- a/io/transform/gsheet2csv/gsheet2csv.go +++ b/io/transform/gsheet2csv/gsheet2csv.go @@ -20,6 +20,8 @@ import ( "os" "strings" "unicode/utf8" + + "github.com/therootcompany/golib/https" ) const ( @@ -31,8 +33,8 @@ const ( var ErrHTTPGet = errors.New("did not get 200 OK when downloading from URL") -// For mocking for tests -var httpGet = http.Get +var httpClient = https.NewDefaultClient() +var httpGet = httpClient.Get // since Get function is used and this allows mocking type Reader struct { *csv.Reader