diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index cf7c2ec1..3ac09733 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -56,11 +56,11 @@ }, { "ImportPath": "github.com/gogo/protobuf/proto", - "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + "Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02" }, { "ImportPath": "github.com/gogo/protobuf/sortkeys", - "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + "Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02" }, { "ImportPath": "github.com/golang/glog", @@ -272,335 +272,335 @@ }, { "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/apps/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/apps/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/apps/v1beta2", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/authentication/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/authentication/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/authorization/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/authorization/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/autoscaling/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/autoscaling/v2beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/autoscaling/v2beta2", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/batch/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/batch/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/batch/v2alpha1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/certificates/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/coordination/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/core/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/events/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/extensions/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/imagepolicy/v1alpha1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/networking/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/policy/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/rbac/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/rbac/v1alpha1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/rbac/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/scheduling/v1alpha1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/scheduling/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/settings/v1alpha1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/storage/v1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/storage/v1alpha1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/api/storage/v1beta1", - "Rev": "942fd07262c19357041a676f7170ed250f58b69a" + "Rev": "26c7a45db37856b19f05ba5aa21d2df4b81ecff3" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/equality", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/cache", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/clock", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/naming", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "e65edc4ced47a9ae9b5ae9c1c193dba1a5827b62" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", diff --git a/vendor/github.com/gogo/protobuf/AUTHORS b/vendor/github.com/gogo/protobuf/AUTHORS index 2eaf4d53..3d97fc7a 100644 --- a/vendor/github.com/gogo/protobuf/AUTHORS +++ b/vendor/github.com/gogo/protobuf/AUTHORS @@ -10,5 +10,6 @@ # Please keep the list sorted. +Sendgrid, Inc Vastech SA (PTY) LTD Walter Schulze diff --git a/vendor/github.com/gogo/protobuf/CONTRIBUTORS b/vendor/github.com/gogo/protobuf/CONTRIBUTORS index 84a85b1e..b1abc4d3 100644 --- a/vendor/github.com/gogo/protobuf/CONTRIBUTORS +++ b/vendor/github.com/gogo/protobuf/CONTRIBUTORS @@ -1,4 +1,5 @@ Anton Povarov +Brian Goff Clayton Coleman Denis Smirnov DongYun Kang @@ -10,9 +11,12 @@ John Shahid John Tuley Laurent Patrick Lee +Roger Johansson +Sam Nguyen Sergio Arbeo Stephen J Day Tamir Duberstein Todd Eisenberger Tormod Erevik Lea +Vyacheslav Kim Walter Schulze diff --git a/vendor/github.com/gogo/protobuf/proto/encode.go b/vendor/github.com/gogo/protobuf/proto/encode.go index 2b30f846..8b84d1b2 100644 --- a/vendor/github.com/gogo/protobuf/proto/encode.go +++ b/vendor/github.com/gogo/protobuf/proto/encode.go @@ -174,11 +174,11 @@ func sizeFixed32(x uint64) int { // This is the format used for the sint64 protocol buffer type. func (p *Buffer) EncodeZigzag64(x uint64) error { // use signed number to get arithmetic right shift. - return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return p.EncodeVarint((x << 1) ^ uint64((int64(x) >> 63))) } func sizeZigzag64(x uint64) int { - return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return sizeVarint((x << 1) ^ uint64((int64(x) >> 63))) } // EncodeZigzag32 writes a zigzag-encoded 32-bit integer diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go index 7580bb45..c98d73da 100644 --- a/vendor/github.com/gogo/protobuf/proto/lib.go +++ b/vendor/github.com/gogo/protobuf/proto/lib.go @@ -73,7 +73,6 @@ for a protocol buffer variable v: When the .proto file specifies `syntax="proto3"`, there are some differences: - Non-repeated fields of non-message type are values instead of pointers. - - Getters are only generated for message and oneof fields. - Enum types do not get an Enum method. The simplest way to describe this is to see an example. diff --git a/vendor/github.com/gogo/protobuf/proto/properties.go b/vendor/github.com/gogo/protobuf/proto/properties.go index 44b33205..2a69e886 100644 --- a/vendor/github.com/gogo/protobuf/proto/properties.go +++ b/vendor/github.com/gogo/protobuf/proto/properties.go @@ -193,6 +193,7 @@ type Properties struct { Default string // default value HasDefault bool // whether an explicit default was provided CustomType string + CastType string StdTime bool StdDuration bool @@ -341,6 +342,8 @@ func (p *Properties) Parse(s string) { p.OrigName = strings.Split(f, "=")[1] case strings.HasPrefix(f, "customtype="): p.CustomType = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "casttype="): + p.CastType = strings.Split(f, "=")[1] case f == "stdtime": p.StdTime = true case f == "stdduration": diff --git a/vendor/github.com/gogo/protobuf/proto/text.go b/vendor/github.com/gogo/protobuf/proto/text.go index d63732fc..f609d1d4 100644 --- a/vendor/github.com/gogo/protobuf/proto/text.go +++ b/vendor/github.com/gogo/protobuf/proto/text.go @@ -522,6 +522,17 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert } return nil } + } else if len(props.CastType) > 0 { + if _, ok := v.Interface().(interface { + String() string + }); ok { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + _, err := fmt.Fprintf(w, "%d", v.Interface()) + return err + } + } } else if props.StdTime { t, ok := v.Interface().(time.Time) if !ok { @@ -531,9 +542,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert if err != nil { return err } - props.StdTime = false - err = tm.writeAny(w, reflect.ValueOf(tproto), props) - props.StdTime = true + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdTime = false + err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy) return err } else if props.StdDuration { d, ok := v.Interface().(time.Duration) @@ -541,9 +552,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface()) } dproto := durationProto(d) - props.StdDuration = false - err := tm.writeAny(w, reflect.ValueOf(dproto), props) - props.StdDuration = true + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdDuration = false + err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy) return err } } diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser.go b/vendor/github.com/gogo/protobuf/proto/text_parser.go index 9db12e96..f1276729 100644 --- a/vendor/github.com/gogo/protobuf/proto/text_parser.go +++ b/vendor/github.com/gogo/protobuf/proto/text_parser.go @@ -983,7 +983,7 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { return p.readStruct(fv, terminator) case reflect.Uint32: if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - fv.SetUint(uint64(x)) + fv.SetUint(x) return nil } case reflect.Uint64: