Skip to content

Commit

Permalink
io/ioutil is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
codingsince1985 committed Jul 17, 2021
1 parent f58b1ff commit 274f19d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions geocoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package geo

import (
"io/ioutil"
"io"
"log"
)

Expand Down Expand Up @@ -35,7 +35,7 @@ type Address struct {
}

// Logger is an implementation of StdLogger that geo uses to log its messages.
var Logger StdLogger = log.New(ioutil.Discard, "[Geo]", log.LstdFlags)
var Logger StdLogger = log.New(io.Discard, "[Geo]", log.LstdFlags)

// StdLogger is a interface for logging libraries.
type StdLogger interface {
Expand Down
4 changes: 2 additions & 2 deletions http_geocoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"errors"
"io/ioutil"
"io"
"net/http"
"net/url"
"strconv"
Expand Down Expand Up @@ -125,7 +125,7 @@ func response(ctx context.Context, url string, obj ResponseParser) error {
}

defer resp.Body.Close()
data, err := ioutil.ReadAll(resp.Body)
data, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
Expand Down

0 comments on commit 274f19d

Please sign in to comment.