diff options
author | Paulo Gomes <pjbgf@linux.com> | 2023-08-05 10:20:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 10:20:38 +0100 |
commit | e6f68d2e4cd1bc4447126816c7c27e1fc2098e30 (patch) | |
tree | 15c5e333b93641f9eadcb4bf4b34c338135f7a23 /plumbing/transport/test | |
parent | 5882d60fb7ccd4cfc0fe69286aa96e198c9d1eb0 (diff) | |
parent | 4ec6b3f4fa9cdfe8f10d0953ac7d398d01a90f17 (diff) | |
download | go-git-e6f68d2e4cd1bc4447126816c7c27e1fc2098e30.tar.gz |
Merge branch 'master' into jc/commit-ammend
Diffstat (limited to 'plumbing/transport/test')
-rw-r--r-- | plumbing/transport/test/receive_pack.go | 6 | ||||
-rw-r--r-- | plumbing/transport/test/upload_pack.go | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go index 018d38e..9414fba 100644 --- a/plumbing/transport/test/receive_pack.go +++ b/plumbing/transport/test/receive_pack.go @@ -1,13 +1,11 @@ // Package test implements common test suite for different transport // implementations. -// package test import ( "bytes" "context" "io" - "io/ioutil" "os" "path/filepath" @@ -235,7 +233,7 @@ func (s *ReceivePackSuite) receivePackNoCheck(c *C, ep *transport.Endpoint, if rootPath != "" && err == nil && stat.IsDir() { objectPath := filepath.Join(rootPath, "objects/pack") - files, err := ioutil.ReadDir(objectPath) + files, err := os.ReadDir(objectPath) c.Assert(err, IsNil) for _, file := range files { @@ -371,5 +369,5 @@ func (s *ReceivePackSuite) emptyPackfile() io.ReadCloser { panic(err) } - return ioutil.NopCloser(&buf) + return io.NopCloser(&buf) } diff --git a/plumbing/transport/test/upload_pack.go b/plumbing/transport/test/upload_pack.go index 3ee029d..f7842eb 100644 --- a/plumbing/transport/test/upload_pack.go +++ b/plumbing/transport/test/upload_pack.go @@ -1,13 +1,11 @@ // Package test implements common test suite for different transport // implementations. -// package test import ( "bytes" "context" "io" - "io/ioutil" "time" "github.com/go-git/go-git/v5/plumbing" @@ -154,7 +152,7 @@ func (s *UploadPackSuite) TestUploadPackWithContextOnRead(c *C) { cancel() - _, err = io.Copy(ioutil.Discard, reader) + _, err = io.Copy(io.Discard, reader) c.Assert(err, NotNil) err = reader.Close() @@ -255,7 +253,7 @@ func (s *UploadPackSuite) TestFetchError(c *C) { } func (s *UploadPackSuite) checkObjectNumber(c *C, r io.Reader, n int) { - b, err := ioutil.ReadAll(r) + b, err := io.ReadAll(r) c.Assert(err, IsNil) buf := bytes.NewBuffer(b) storage := memory.NewStorage() |