Skip to content

Commit

Permalink
Swap io/ioutil package for io package
Browse files Browse the repository at this point in the history
  • Loading branch information
atc0005 committed Aug 24, 2022
1 parent d219337 commit 42bb667
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/lockss/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package lockss

import (
"io/ioutil"
"io"
"log"
"os"
)
Expand All @@ -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)

}

Expand All @@ -39,5 +39,5 @@ func EnableLogging() {
// all logging output.
func DisableLogging() {
logger.SetFlags(0)
logger.SetOutput(ioutil.Discard)
logger.SetOutput(io.Discard)
}
4 changes: 2 additions & 2 deletions internal/lockss/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"
"os"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 42bb667

Please sign in to comment.