Commit c4244a69 authored by Yann Hodique's avatar Yann Hodique

update github.com/matttproud/golang_protobuf_extensions to 1.0.1

This updates github.com/matttproud/golang_protobuf_extensions to a released version. There's no significant change in the code itself, and the corresponding tests (which are not vendored) behave better with vgo (see details in #65683).
parent 72440a10
......@@ -2102,7 +2102,8 @@
},
{
"ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil",
"Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"
"Comment": "v1.0.1",
"Rev": "c12348ce28de40eed0136aa2b644d0ee0650e56c"
},
{
"ImportPath": "github.com/mholt/caddy/caddyfile",
......
......@@ -71726,7 +71726,7 @@ SOFTWARE.
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
......@@ -71734,7 +71734,7 @@ SOFTWARE.
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2013 Matt T. Proud
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -71748,7 +71748,7 @@ SOFTWARE.
See the License for the specific language governing permissions and
limitations under the License.
= vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE a45ffb9ad39d4b4c1053bb27f6bb4272
= vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE e3fc50a88d0a364313df4b21ef20c29e
================================================================================
......@@ -548,7 +548,7 @@
},
{
"ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil",
"Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"
"Rev": "c12348ce28de40eed0136aa2b644d0ee0650e56c"
},
{
"ImportPath": "github.com/modern-go/concurrent",
......
......@@ -520,7 +520,7 @@
},
{
"ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil",
"Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"
"Rev": "c12348ce28de40eed0136aa2b644d0ee0650e56c"
},
{
"ImportPath": "github.com/modern-go/concurrent",
......
......@@ -236,7 +236,7 @@
},
{
"ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil",
"Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"
"Rev": "c12348ce28de40eed0136aa2b644d0ee0650e56c"
},
{
"ImportPath": "github.com/modern-go/concurrent",
......
......@@ -228,7 +228,7 @@
},
{
"ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil",
"Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"
"Rev": "c12348ce28de40eed0136aa2b644d0ee0650e56c"
},
{
"ImportPath": "github.com/modern-go/concurrent",
......
......@@ -178,7 +178,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
......@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2013 Matt T. Proud
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
Copyright 2012 Matt T. Proud (matt.proud@gmail.com)
all:
cover:
go test -cover -v -coverprofile=cover.dat ./...
go tool cover -func cover.dat
.PHONY: cover
......@@ -38,7 +38,7 @@ var errInvalidVarint = errors.New("invalid varint32 encountered")
func ReadDelimited(r io.Reader, m proto.Message) (n int, err error) {
// Per AbstractParser#parsePartialDelimitedFrom with
// CodedInputStream#readRawVarint32.
headerBuf := make([]byte, binary.MaxVarintLen32)
var headerBuf [binary.MaxVarintLen32]byte
var bytesRead, varIntBytes int
var messageLength uint64
for varIntBytes == 0 { // i.e. no varint has been decoded yet.
......
......@@ -33,8 +33,8 @@ func WriteDelimited(w io.Writer, m proto.Message) (n int, err error) {
return 0, err
}
buf := make([]byte, binary.MaxVarintLen32)
encodedLength := binary.PutUvarint(buf, uint64(len(buffer)))
var buf [binary.MaxVarintLen32]byte
encodedLength := binary.PutUvarint(buf[:], uint64(len(buffer)))
sync, err := w.Write(buf[:encodedLength])
if err != nil {
......
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