Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2021-09-21 19:56:13 +0300
committerStan Hu <stanhu@gmail.com>2021-09-21 19:56:13 +0300
commit5d47b529c4d1f645a95894b11a4e236c719a8f9c (patch)
tree516f76d20079e9abc923dfdd83facb68e6e0b87b
parentc5a32bd5a681b448c5aae248a5adfe332037eaca (diff)
Use io.CopyN instead of ioutil.CopyN
go 1.16 deprecated the ioutil package.
-rw-r--r--internal/git/catfile/batch_process.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/git/catfile/batch_process.go b/internal/git/catfile/batch_process.go
index 30a79c963..1f2f1f5bd 100644
--- a/internal/git/catfile/batch_process.go
+++ b/internal/git/catfile/batch_process.go
@@ -5,7 +5,6 @@ import (
"context"
"fmt"
"io"
- "io/ioutil"
"sync"
"github.com/opentracing/opentracing-go"
@@ -102,7 +101,7 @@ func (b *batchProcess) reader(revision git.Revision, expectedType string) (*Obje
if oi.Type != expectedType {
// This is a programmer error and it should never happen. But if it does,
// we need to leave the cat-file process in a good state
- if _, err := io.CopyN(ioutil.Discard, b.r, b.n); err != nil {
+ if _, err := io.CopyN(io.Discard, b.r, b.n); err != nil {
return nil, err
}
b.n = 0