Skip to content

Commit

Permalink
all: replace ioutil pkg to new package (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
uji committed May 26, 2023
1 parent d3e4fe6 commit 7b4d7eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var (
// Note: The provided rsa.PublicKey instance is exclusively owned by the driver
// after registering it and may not be modified.
//
// data, err := ioutil.ReadFile("mykey.pem")
// data, err := os.ReadFile("mykey.pem")
// if err != nil {
// log.Fatal(err)
// }
Expand Down
3 changes: 1 addition & 2 deletions driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"math"
"net"
Expand Down Expand Up @@ -1245,7 +1244,7 @@ func TestLoadData(t *testing.T) {
dbt.mustExec("CREATE TABLE test (id INT NOT NULL PRIMARY KEY, value TEXT NOT NULL) CHARACTER SET utf8")

// Local File
file, err := ioutil.TempFile("", "gotest")
file, err := os.CreateTemp("", "gotest")
defer os.Remove(file.Name())
if err != nil {
dbt.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
// registering it.
//
// rootCertPool := x509.NewCertPool()
// pem, err := ioutil.ReadFile("/path/ca-cert.pem")
// pem, err := os.ReadFile("/path/ca-cert.pem")
// if err != nil {
// log.Fatal(err)
// }
Expand Down

0 comments on commit 7b4d7eb

Please sign in to comment.