mirror of
https://github.com/therootcompany/golib.git
synced 2026-11-04 06:55:00 +00:00
fix(io/transform/gsheet2csv): use safe defaults for http client
This commit is contained in:
parent
c66c4a8de4
commit
484b6bc11a
@ -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
|
||||
|
||||
2
io/transform/gsheet2csv/go.sum
Normal file
2
io/transform/gsheet2csv/go.sum
Normal file
@ -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=
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user