forked from CiscoDevNet/bigmuddy-network-telemetry-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vendor.patch
23 lines (22 loc) · 1.03 KB
/
vendor.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
index 1fc8ae8..0601365 100644
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
+++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
@@ -62,6 +62,9 @@ type Marshaler struct {
// Whether to render fields with zero values.
EmitDefaults bool
+ // Whether to render int64/uint64 as strings or not?
+ EmitUInt64Unquoted bool
+
// A string to indent each level by. The presence of this field will
// also cause a space to appear between the field separator and
// value, and for newlines to be appear between fields and array
@@ -499,7 +502,7 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle
if err != nil {
return err
}
- needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64)
+ needToQuote := !m.EmitUInt64Unquoted && string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64)
if needToQuote {
out.write(`"`)
}