Skip to content

Commit 0a5377c

Browse files
committed
chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
1 parent b403762 commit 0a5377c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

db_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"crypto/tls"
77
"database/sql"
88
"fmt"
9-
"io/ioutil"
9+
"io"
1010
"math"
1111
"net"
1212
"os"
@@ -227,7 +227,7 @@ func TestBigColumn(t *testing.T) {
227227
t.Fatal(err)
228228
}
229229

230-
_, err = db.CopyTo(ioutil.Discard, "COPY (SELECT * FROM tests) TO STDOUT WITH CSV")
230+
_, err = db.CopyTo(io.Discard, "COPY (SELECT * FROM tests) TO STDOUT WITH CSV")
231231
if err != nil {
232232
t.Fatal(err)
233233
}

hook_test.go

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

33
import (
44
"context"
5-
"io/ioutil"
5+
"io"
66
"strings"
77

88
. "github.com/onsi/ginkgo"
@@ -422,7 +422,7 @@ var _ = Describe("BeforeQuery and AfterQuery", func() {
422422
}
423423
db.AddQueryHook(hookImpl)
424424

425-
_, err := db.Model((*HookTest)(nil)).CopyTo(ioutil.Discard, `COPY ?TableName TO STDOUT CSV`)
425+
_, err := db.Model((*HookTest)(nil)).CopyTo(io.Discard, `COPY ?TableName TO STDOUT CSV`)
426426
Expect(err).NotTo(HaveOccurred())
427427
})
428428

@@ -469,7 +469,7 @@ var _ = Describe("BeforeQuery and AfterQuery", func() {
469469
}
470470
db.AddQueryHook(hookImpl)
471471

472-
_, err := db.CopyTo(ioutil.Discard, `COPY (SELECT 1) TO STDOUT CSV`)
472+
_, err := db.CopyTo(io.Discard, `COPY (SELECT 1) TO STDOUT CSV`)
473473
Expect(err).NotTo(HaveOccurred())
474474
})
475475
})

0 commit comments

Comments
 (0)