Replace deprecated iotuil.ReadAll with io.ReadAll (#6678)
Per [1]: > Deprecated: As of Go 1.16, this function (ioutil.ReadAll) simply calls io.ReadAll. 1. https://pkg.go.dev/io/ioutil#ReadAll
This commit is contained in:
parent
6c84a69043
commit
365c9af463
|
|
@ -1,7 +1,7 @@
|
||||||
package probers
|
package probers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ func (p CRLProbe) Probe(timeout time.Duration) (bool, time.Duration) {
|
||||||
return false, time.Since(start)
|
return false, time.Since(start)
|
||||||
}
|
}
|
||||||
|
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, time.Since(start)
|
return false, time.Since(start)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue