File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
conformance/utils/roundtripper Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ linters:
1313 - goimports
1414 - revive
1515 - govet
16+ - gomodguard
1617 - misspell
1718 - exportloopref
1819 disable :
@@ -36,7 +37,16 @@ linters-settings:
3637 check-shadowing : true
3738 misspell :
3839 locale : US
39- ignore-words :
40+ ignore-words : []
41+ gomodguard :
42+ blocked :
43+ # List of blocked modules.
44+ modules :
45+ - io/ioutil :
46+ recommendations :
47+ - io
48+ - os
49+ reason : " Deprecation of package ioutil in Go 1.16."
4050
4151issues :
4252 exclude-rules :
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import (
2323 "encoding/json"
2424 "fmt"
2525 "io"
26- iou "io/ioutil"
2726 "net/http"
2827 "net/http/httputil"
2928 "net/url"
@@ -182,7 +181,10 @@ func (d *DefaultRoundTripper) CaptureRoundTrip(request Request) (*CapturedReques
182181 fmt .Printf ("Received Response:\n %s\n \n " , formatDump (dump , "< " ))
183182 }
184183
185- body , _ := iou .ReadAll (resp .Body )
184+ body , err := io .ReadAll (resp .Body )
185+ if err != nil {
186+ return nil , nil , err
187+ }
186188
187189 // we cannot assume the response is JSON
188190 if resp .Header .Get ("Content-type" ) == "application/json" {
You can’t perform that action at this time.
0 commit comments