aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/golang/protobuf/proto/lib.go
diff options
context:
space:
mode:
authorNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
committerNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
commit107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch)
treeca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/golang/protobuf/proto/lib.go
parent844b5a68d8af4791755b8f0ad293cc99f5959183 (diff)
downloadterraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/golang/protobuf/proto/lib.go')
-rw-r--r--vendor/github.com/golang/protobuf/proto/lib.go38
1 files changed, 12 insertions, 26 deletions
diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go
index 75565cc..fdd328b 100644
--- a/vendor/github.com/golang/protobuf/proto/lib.go
+++ b/vendor/github.com/golang/protobuf/proto/lib.go
@@ -341,26 +341,6 @@ type Message interface {
341 ProtoMessage() 341 ProtoMessage()
342} 342}
343 343
344// Stats records allocation details about the protocol buffer encoders
345// and decoders. Useful for tuning the library itself.
346type Stats struct {
347 Emalloc uint64 // mallocs in encode
348 Dmalloc uint64 // mallocs in decode
349 Encode uint64 // number of encodes
350 Decode uint64 // number of decodes
351 Chit uint64 // number of cache hits
352 Cmiss uint64 // number of cache misses
353 Size uint64 // number of sizes
354}
355
356// Set to true to enable stats collection.
357const collectStats = false
358
359var stats Stats
360
361// GetStats returns a copy of the global Stats structure.
362func GetStats() Stats { return stats }
363
364// A Buffer is a buffer manager for marshaling and unmarshaling 344// A Buffer is a buffer manager for marshaling and unmarshaling
365// protocol buffers. It may be reused between invocations to 345// protocol buffers. It may be reused between invocations to
366// reduce memory usage. It is not necessary to use a Buffer; 346// reduce memory usage. It is not necessary to use a Buffer;
@@ -960,13 +940,19 @@ func isProto3Zero(v reflect.Value) bool {
960 return false 940 return false
961} 941}
962 942
963// ProtoPackageIsVersion2 is referenced from generated protocol buffer files 943const (
964// to assert that that code is compatible with this version of the proto package. 944 // ProtoPackageIsVersion3 is referenced from generated protocol buffer files
965const ProtoPackageIsVersion2 = true 945 // to assert that that code is compatible with this version of the proto package.
946 ProtoPackageIsVersion3 = true
947
948 // ProtoPackageIsVersion2 is referenced from generated protocol buffer files
949 // to assert that that code is compatible with this version of the proto package.
950 ProtoPackageIsVersion2 = true
966 951
967// ProtoPackageIsVersion1 is referenced from generated protocol buffer files 952 // ProtoPackageIsVersion1 is referenced from generated protocol buffer files
968// to assert that that code is compatible with this version of the proto package. 953 // to assert that that code is compatible with this version of the proto package.
969const ProtoPackageIsVersion1 = true 954 ProtoPackageIsVersion1 = true
955)
970 956
971// InternalMessageInfo is a type used internally by generated .pb.go files. 957// InternalMessageInfo is a type used internally by generated .pb.go files.
972// This type is not intended to be used by non-generated code. 958// This type is not intended to be used by non-generated code.