diff options
Diffstat (limited to 'go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/inforefs.go')
-rw-r--r-- | go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/inforefs.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/inforefs.go b/go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/inforefs.go deleted file mode 100644 index 5ddfbc2..0000000 --- a/go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/inforefs.go +++ /dev/null @@ -1,32 +0,0 @@ -package helper - -import ( - "io" - - pb "gitlab.com/gitlab-org/gitaly-proto/go" -) - -type InfoRefsClient interface { - Recv() (*pb.InfoRefsResponse, error) -} - -type InfoRefsClientWriterTo struct { - InfoRefsClient -} - -func (clientReader *InfoRefsClientWriterTo) WriteTo(w io.Writer) (total int64, err error) { - for { - response, err := clientReader.Recv() - if err == io.EOF { - return total, nil - } else if err != nil { - return total, err - } - - n, err := w.Write(response.GetData()) - total += int64(n) - if err != nil { - return total, err - } - } -} |