Commit a3be5472 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use gitaly-proto 0.5.1

parent b0b91eb5
package helper
import (
"io"
)
// NewReceiveReader turns receiver into an io.Reader. Errors from the
// receiver function are passed on unmodified. This means receiver should
// emit io.EOF when done.
func NewReceiveReader(receiver func() ([]byte, error)) io.Reader {
return &receiveReader{receiver: receiver}
}
type receiveReader struct {
receiver func() ([]byte, error)
data []byte
err error
}
func (rr *receiveReader) Read(p []byte) (int, error) {
if len(rr.data) == 0 {
rr.data, rr.err = rr.receiver()
}
n := copy(p, rr.data)
rr.data = rr.data[n:]
if len(rr.data) == 0 {
return n, rr.err
}
return n, nil
}
// NewSendWriter turns sender into an io.Writer. The number of 'bytes
// written' reported back is always len(p).
func NewSendWriter(sender func(p []byte) error) io.Writer {
return &sendWriter{sender: sender}
}
type sendWriter struct {
sender func([]byte) error
}
func (sw *sendWriter) Write(p []byte) (int, error) {
return len(p), sw.sender(p)
}
......@@ -128,20 +128,20 @@
"revisionTime": "2016-11-17T07:43:51Z"
},
{
"checksumSHA1": "qnITGZYkVMWqbOeVVt6jMKJ544M=",
"checksumSHA1": "8+jRNQyKFIBwS222eR6mKOhgXrY=",
"path": "gitlab.com/gitlab-org/gitaly-proto/go",
"revision": "52f77b23166e640a932e50223472d761404afb42",
"revisionTime": "2017-03-29T16:52:58Z",
"version": "v0.5.0",
"versionExact": "v0.5.0"
"revision": "fcdb86aa58b7d3a729b4bb17fef12bf0a3fba131",
"revisionTime": "2017-04-25T15:29:29Z",
"version": "v0.5.1",
"versionExact": "v0.5.1"
},
{
"checksumSHA1": "2E36lBoyaVky2EJP1E5ub6Rg+uI=",
"checksumSHA1": "GkeSZfXVbtAkBZOrswot19GJZqQ=",
"path": "gitlab.com/gitlab-org/gitaly-proto/go/helper",
"revision": "52f77b23166e640a932e50223472d761404afb42",
"revisionTime": "2017-03-29T16:52:58Z",
"version": "v0.5.0",
"versionExact": "v0.5.0"
"revision": "fcdb86aa58b7d3a729b4bb17fef12bf0a3fba131",
"revisionTime": "2017-04-25T15:29:29Z",
"version": "v0.5.1",
"versionExact": "v0.5.1"
},
{
"checksumSHA1": "9jjO5GjLa0XF/nfWihF02RoH4qc=",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment