aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-05-11 21:59:37 +0100
committerPaulo Gomes <pjbgf@linux.com>2023-05-11 21:59:37 +0100
commit096b3cc16b547f3c0d6e4f92046945bcfac0fa14 (patch)
treedf3e5f5265aac52a6683be10d74561e26e70cb0c /plumbing/object
parent9dfaf6acd8e3aa1c85bcce7d45f8e8c6b908319c (diff)
downloadgo-git-096b3cc16b547f3c0d6e4f92046945bcfac0fa14.tar.gz
*: Remove use of deprecated io/util
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
Diffstat (limited to 'plumbing/object')
-rw-r--r--plumbing/object/blob_test.go7
-rw-r--r--plumbing/object/commit_test.go5
-rw-r--r--plumbing/object/object_test.go3
-rw-r--r--plumbing/object/tag_test.go3
4 files changed, 7 insertions, 11 deletions
diff --git a/plumbing/object/blob_test.go b/plumbing/object/blob_test.go
index 4461343..9481dbe 100644
--- a/plumbing/object/blob_test.go
+++ b/plumbing/object/blob_test.go
@@ -3,7 +3,6 @@ package object
import (
"bytes"
"io"
- "io/ioutil"
"github.com/go-git/go-git/v5/plumbing"
@@ -37,7 +36,7 @@ func (s *BlobsSuite) TestBlobHash(c *C) {
c.Assert(err, IsNil)
defer func() { c.Assert(reader.Close(), IsNil) }()
- data, err := ioutil.ReadAll(reader)
+ data, err := io.ReadAll(reader)
c.Assert(err, IsNil)
c.Assert(string(data), Equals, "FOO")
}
@@ -96,14 +95,14 @@ func (s *BlobsSuite) TestBlobIter(c *C) {
r1, err := b.Reader()
c.Assert(err, IsNil)
- b1, err := ioutil.ReadAll(r1)
+ b1, err := io.ReadAll(r1)
c.Assert(err, IsNil)
c.Assert(r1.Close(), IsNil)
r2, err := blobs[i].Reader()
c.Assert(err, IsNil)
- b2, err := ioutil.ReadAll(r2)
+ b2, err := io.ReadAll(r2)
c.Assert(err, IsNil)
c.Assert(r2.Close(), IsNil)
diff --git a/plumbing/object/commit_test.go b/plumbing/object/commit_test.go
index 468a751..a939bc6 100644
--- a/plumbing/object/commit_test.go
+++ b/plumbing/object/commit_test.go
@@ -4,7 +4,6 @@ import (
"bytes"
"context"
"io"
- "io/ioutil"
"strings"
"time"
@@ -449,7 +448,7 @@ YIefGtzXfldDxg4=
`
e, err := commit.Verify(armoredKeyRing)
- c.Assert(err, IsNil)
+ c.Assert(err, IsNil)
_, ok := e.Identities["go-git test key"]
c.Assert(ok, Equals, true)
@@ -492,7 +491,7 @@ func (s *SuiteCommit) TestEncodeWithoutSignature(c *C) {
c.Assert(err, IsNil)
er, err := encoded.Reader()
c.Assert(err, IsNil)
- payload, err := ioutil.ReadAll(er)
+ payload, err := io.ReadAll(er)
c.Assert(err, IsNil)
c.Assert(string(payload), Equals, ""+
diff --git a/plumbing/object/object_test.go b/plumbing/object/object_test.go
index 6c95eef..c4fdb4c 100644
--- a/plumbing/object/object_test.go
+++ b/plumbing/object/object_test.go
@@ -2,7 +2,6 @@ package object
import (
"io"
- "io/ioutil"
"testing"
"time"
@@ -103,7 +102,7 @@ func (s *ObjectsSuite) TestParseTree(c *C) {
reader, err := f.Reader()
c.Assert(err, IsNil)
defer func() { c.Assert(reader.Close(), IsNil) }()
- content, _ := ioutil.ReadAll(reader)
+ content, _ := io.ReadAll(reader)
c.Assert(content, HasLen, 2780)
}
}
diff --git a/plumbing/object/tag_test.go b/plumbing/object/tag_test.go
index 15b943e..d374c6c 100644
--- a/plumbing/object/tag_test.go
+++ b/plumbing/object/tag_test.go
@@ -3,7 +3,6 @@ package object
import (
"fmt"
"io"
- "io/ioutil"
"strings"
"time"
@@ -466,7 +465,7 @@ func (s *TagSuite) TestEncodeWithoutSignature(c *C) {
c.Assert(err, IsNil)
er, err := encoded.Reader()
c.Assert(err, IsNil)
- payload, err := ioutil.ReadAll(er)
+ payload, err := io.ReadAll(er)
c.Assert(err, IsNil)
c.Assert(string(payload), Equals, ""+