4
4
"container/list"
5
5
"encoding/json"
6
6
"fmt"
7
- "io/ioutil "
7
+ "io"
8
8
"log"
9
9
"math/rand"
10
10
flag "mflag"
@@ -169,7 +169,7 @@ var spoofAgents = []string{
169
169
170
170
func readArchives () (body []byte , err error ) {
171
171
if ! regs ["isprtcl" ].MatchString (* arcsloc ) {
172
- body , err = ioutil .ReadFile (* arcsloc )
172
+ body , err = os .ReadFile (* arcsloc )
173
173
return
174
174
}
175
175
res , err := http .Get (* arcsloc )
@@ -181,7 +181,7 @@ func readArchives() (body []byte, err error) {
181
181
err = fmt .Errorf (res .Status )
182
182
return
183
183
}
184
- body , err = ioutil .ReadAll (res .Body )
184
+ body , err = io .ReadAll (res .Body )
185
185
return
186
186
}
187
187
@@ -312,7 +312,7 @@ func fetchTimemap(urir string, arch *Archive, tmCh chan *list.List, wg *sync.Wai
312
312
}
313
313
lnks := res .Header .Get ("Link" )
314
314
if dttmp == nil {
315
- body , err := ioutil .ReadAll (res .Body )
315
+ body , err := io .ReadAll (res .Body )
316
316
if err != nil {
317
317
benchmarker (arch .ID , "timemapfetch" , fmt .Sprintf ("Response read error in %s" , arch .Name ), start , sess )
318
318
logError .Printf ("%s => Response read error: %v" , arch .ID , err )
@@ -858,8 +858,8 @@ func usage() {
858
858
func initLoggers () {
859
859
logFatal = log .New (os .Stderr , "FATAL: " , log .Lshortfile )
860
860
errorHandle := os .Stderr
861
- infoHandle := ioutil .Discard
862
- benchmarkHandle := ioutil .Discard
861
+ infoHandle := io .Discard
862
+ benchmarkHandle := io .Discard
863
863
if * logfile != "" {
864
864
lgf , err := os .OpenFile (* logfile , os .O_CREATE | os .O_WRONLY | os .O_APPEND , 0666 )
865
865
if err != nil {
0 commit comments