diff options
author | Paulo Gomes <pjbgf@linux.com> | 2023-05-15 20:22:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 20:22:28 +0100 |
commit | 4ff2213cc5422d3300cf9828ea0781820888d32d (patch) | |
tree | 9226bdd5f898f0813126e6df5f99ddf2bfec08c5 /utils/ioutil/common_test.go | |
parent | dc2b346ed149080199d578f0190f3ac1156480c2 (diff) | |
parent | bddd89e697ebdaad2fe341b3e8a3233691f5544a (diff) | |
download | go-git-4ff2213cc5422d3300cf9828ea0781820888d32d.tar.gz |
Merge pull request #770 from pjbgf/small-fixes
*: Small fixes across the codebase
Diffstat (limited to 'utils/ioutil/common_test.go')
-rw-r--r-- | utils/ioutil/common_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/ioutil/common_test.go b/utils/ioutil/common_test.go index 27bfa62..e3c9d69 100644 --- a/utils/ioutil/common_test.go +++ b/utils/ioutil/common_test.go @@ -3,7 +3,7 @@ package ioutil import ( "bytes" "context" - "io/ioutil" + "io" "strings" "testing" @@ -38,7 +38,7 @@ func (s *CommonSuite) TestNonEmptyReader_NonEmpty(c *C) { c.Assert(err, IsNil) c.Assert(r, NotNil) - read, err := ioutil.ReadAll(r) + read, err := io.ReadAll(r) c.Assert(err, IsNil) c.Assert(string(read), Equals, "1") } @@ -48,7 +48,7 @@ func (s *CommonSuite) TestNewReadCloser(c *C) { closer := &closer{} r := NewReadCloser(buf, closer) - read, err := ioutil.ReadAll(r) + read, err := io.ReadAll(r) c.Assert(err, IsNil) c.Assert(string(read), Equals, "1") @@ -160,7 +160,7 @@ func ExampleCheckClose() { // CheckClose is commonly used with named return values f := func() (err error) { // Get a io.ReadCloser - r := ioutil.NopCloser(strings.NewReader("foo")) + r := io.NopCloser(strings.NewReader("foo")) // defer CheckClose call with an io.Closer and pointer to error defer CheckClose(r, &err) |