Stop using deprecated ioutil functions

This commit is contained in:
Katrina Verey
2022-08-10 16:59:18 -04:00
parent 416eed97c4
commit f6b72077c8
70 changed files with 322 additions and 362 deletions

View File

@@ -5,7 +5,7 @@ package loader
import (
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"net/url"
@@ -302,7 +302,7 @@ func (fl *fileLoader) Load(path string) ([]byte, error) {
}
return nil, fmt.Errorf("%w: status code %d (%s)", ErrHTTP, resp.StatusCode, http.StatusText(resp.StatusCode))
}
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}