Skip to content

Commit dd30a1c

Browse files
committed
refactor: lint
1 parent ba04697 commit dd30a1c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"crypto/tls"
55
"crypto/x509"
66
"github.com/stretchr/testify/assert"
7-
"io/ioutil"
87
"net/http"
8+
"os"
99
"path/filepath"
1010
"testing"
1111
)
@@ -54,7 +54,7 @@ func TestNewClientWithTLS(t *testing.T) {
5454
assert.NoError(t, err)
5555
}
5656

57-
caCert, err := ioutil.ReadFile(caPath)
57+
caCert, err := os.ReadFile(caPath)
5858
if err != nil {
5959
assert.NoError(t, err)
6060
}

request.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package mysqlrouter
22

33
import (
44
"fmt"
5-
"io/ioutil"
5+
"io"
66
"net/http"
77
)
88

@@ -34,5 +34,5 @@ func (c *Client) request(url string) ([]byte, error) {
3434
return nil, fmt.Errorf("%s got %d", errStatusCode, resp.StatusCode)
3535
}
3636

37-
return ioutil.ReadAll(resp.Body)
37+
return io.ReadAll(resp.Body)
3838
}

0 commit comments

Comments
 (0)