diff --git a/internal/lockss/init.go b/internal/lockss/init.go index 78f8c97..796032f 100644 --- a/internal/lockss/init.go +++ b/internal/lockss/init.go @@ -8,7 +8,7 @@ package lockss import ( - "io/ioutil" + "io" "log" "os" ) @@ -24,7 +24,7 @@ func init() { // Disable logging output by default unless client code explicitly // requests it logger = log.New(os.Stderr, "[go-lockss/lockss] ", 0) - logger.SetOutput(ioutil.Discard) + logger.SetOutput(io.Discard) } @@ -39,5 +39,5 @@ func EnableLogging() { // all logging output. func DisableLogging() { logger.SetFlags(0) - logger.SetOutput(ioutil.Discard) + logger.SetOutput(io.Discard) } diff --git a/internal/lockss/load.go b/internal/lockss/load.go index 7e7503f..1aeb421 100644 --- a/internal/lockss/load.go +++ b/internal/lockss/load.go @@ -13,7 +13,7 @@ import ( "context" "errors" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -185,7 +185,7 @@ func (c *Config) loadFromPropsURLWithContext(ctx context.Context, url string) (* // Get the response body directly. We'll create a bytes buffer later to // wrap the response data in order to provide an io.Reader where needed. - responseData, err := ioutil.ReadAll(resp.Body) + responseData, err := io.ReadAll(resp.Body) if err != nil { logger.Println(err) return nil, err