Skip to content

Commit

Permalink
Merge pull request #6 from kiyadotdev/chore/deprecation-of-ioutil
Browse files Browse the repository at this point in the history
chore/deprecation-of-ioutil
  • Loading branch information
yusufpapurcu authored Jun 7, 2021
2 parents 97a6302 + 245c8e6 commit 8527b28
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package postgrest
import (
"bytes"
"encoding/json"
"io/ioutil"
"io"
"net/http"
"net/url"
)
Expand Down Expand Up @@ -100,7 +100,7 @@ func (c *Client) Rpc(name string, count string, rpcBody interface{}) string {
return ""
}

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
c.ClientError = err
return ""
Expand Down
4 changes: 2 additions & 2 deletions execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package postgrest

import (
"bytes"
"io/ioutil"
"io"
"net/http"
)

Expand All @@ -21,7 +21,7 @@ func ExecuteHelper(client *Client, method string, body []byte) ([]byte, error) {
return nil, err
}

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

0 comments on commit 8527b28

Please sign in to comment.