summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/golang/protobuf/proto/buffer.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-05-10 07:40:54 +0200
committerGitHub <noreply@github.com>2020-05-10 06:40:54 +0100
commitfdf750e4d4273620e774d03db087ab0dd4eef8c5 (patch)
tree3185d56c8cdbdce9fdd5d320062fed16bee65db9 /vendor/github.com/golang/protobuf/proto/buffer.go
parenta44854c287ac7127a73ea2790716311ba918dd1d (diff)
downloadgitea-fdf750e4d4273620e774d03db087ab0dd4eef8c5.tar.gz
gitea-fdf750e4d4273620e774d03db087ab0dd4eef8c5.zip
[Vendor] blevesearch v0.8.1 -> v1.0.7 (#11360)
* Update blevesearch v0.8.1 -> v1.0.7 * make vendor Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'vendor/github.com/golang/protobuf/proto/buffer.go')
-rw-r--r--vendor/github.com/golang/protobuf/proto/buffer.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/vendor/github.com/golang/protobuf/proto/buffer.go b/vendor/github.com/golang/protobuf/proto/buffer.go
index 62df7e3b8b..e810e6fea1 100644
--- a/vendor/github.com/golang/protobuf/proto/buffer.go
+++ b/vendor/github.com/golang/protobuf/proto/buffer.go
@@ -33,8 +33,8 @@ func SizeVarint(v uint64) int {
return protowire.SizeVarint(v)
}
-// DecodeVarint parses a varint encoded integer from b, returning the
-// integer value and the length of the varint.
+// DecodeVarint parses a varint encoded integer from b,
+// returning the integer value and the length of the varint.
// It returns (0, 0) if there is a parse error.
func DecodeVarint(b []byte) (uint64, int) {
v, n := protowire.ConsumeVarint(b)
@@ -112,9 +112,9 @@ func (b *Buffer) Marshal(m Message) error {
return err
}
-// Unmarshal parses the wire-format message in the buffer and places the decoded results in m.
-//
-// Unlike proto.Unmarshal, this does not reset the message before starting to unmarshal.
+// Unmarshal parses the wire-format message in the buffer and
+// places the decoded results in m.
+// It does not reset m before unmarshaling.
func (b *Buffer) Unmarshal(m Message) error {
err := UnmarshalMerge(b.Unread(), m)
b.idx = len(b.buf)
@@ -260,7 +260,7 @@ func (b *Buffer) DecodeStringBytes() (string, error) {
}
// DecodeMessage consumes a length-prefixed message from the buffer.
-// It does not reset m.
+// It does not reset m before unmarshaling.
func (b *Buffer) DecodeMessage(m Message) error {
v, err := b.DecodeRawBytes(false)
if err != nil {
@@ -272,7 +272,7 @@ func (b *Buffer) DecodeMessage(m Message) error {
// DecodeGroup consumes a message group from the buffer.
// It assumes that the start group marker has already been consumed and
// consumes all bytes until (and including the end group marker).
-// It does not reset m.
+// It does not reset m before unmarshaling.
func (b *Buffer) DecodeGroup(m Message) error {
v, n, err := consumeGroup(b.buf[b.idx:])
if err != nil {