Skip to content

Commit

Permalink
fix(io): Remove refs to deprecated io/ioutil (#2001)
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill authored Mar 20, 2024
1 parent b403762 commit 18e0a92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"crypto/tls"
"database/sql"
"fmt"
"io/ioutil"
"io"
"math"
"net"
"os"
Expand Down Expand Up @@ -227,7 +227,7 @@ func TestBigColumn(t *testing.T) {
t.Fatal(err)
}

_, err = db.CopyTo(ioutil.Discard, "COPY (SELECT * FROM tests) TO STDOUT WITH CSV")
_, err = db.CopyTo(io.Discard, "COPY (SELECT * FROM tests) TO STDOUT WITH CSV")
if err != nil {
t.Fatal(err)
}
Expand Down
6 changes: 3 additions & 3 deletions hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package pg_test

import (
"context"
"io/ioutil"
"io"
"strings"

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

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

Expand Down Expand Up @@ -469,7 +469,7 @@ var _ = Describe("BeforeQuery and AfterQuery", func() {
}
db.AddQueryHook(hookImpl)

_, err := db.CopyTo(ioutil.Discard, `COPY (SELECT 1) TO STDOUT CSV`)
_, err := db.CopyTo(io.Discard, `COPY (SELECT 1) TO STDOUT CSV`)
Expect(err).NotTo(HaveOccurred())
})
})
Expand Down

0 comments on commit 18e0a92

Please sign in to comment.