mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 20:36:21 +01:00
Update vendoring for github.com/matttproud/golang_protobuf_extensions/pbutil
This commit is contained in:
parent
3939e9d0b1
commit
f190b8f5a4
7
vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile
generated
vendored
Normal file
7
vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
all:
|
||||
|
||||
cover:
|
||||
go test -cover -v -coverprofile=cover.dat ./...
|
||||
go tool cover -func cover.dat
|
||||
|
||||
.PHONY: cover
|
2
vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go
generated
vendored
2
vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go
generated
vendored
@ -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.
|
||||
|
4
vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go
generated
vendored
4
vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go
generated
vendored
@ -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 {
|
||||
|
5
vendor/vendor.json
vendored
5
vendor/vendor.json
vendored
@ -44,9 +44,10 @@
|
||||
"revisionTime": "2015-04-13T22:18:30+03:00"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "bKMZjd2wPw13VwoE7mBeSv5djFA=",
|
||||
"path": "github.com/matttproud/golang_protobuf_extensions/pbutil",
|
||||
"revision": "d0c3fe89de86839aecf2e0579c40ba3bb336a453",
|
||||
"revisionTime": "2015-10-11T12:25:29+02:00"
|
||||
"revision": "c12348ce28de40eed0136aa2b644d0ee0650e56c",
|
||||
"revisionTime": "2016-04-24T11:30:07Z"
|
||||
},
|
||||
{
|
||||
"path": "github.com/prometheus/client_golang/prometheus",
|
||||
|
Loading…
Reference in New Issue
Block a user