aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/golang/protobuf/proto/properties.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-09-03 20:56:02 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-09-03 21:16:02 +0100
commit84e4e2d56d3e2878741a2d03a98d4739db8dbd50 (patch)
treedf9d3e92071291fd154f149072e470d8cecbfd11 /vendor/github.com/golang/protobuf/proto/properties.go
parenteb9015e8f6f92e3e4421ddaf74ad20960723596c (diff)
Update dependencies
Also tweak travis config
Diffstat (limited to 'vendor/github.com/golang/protobuf/proto/properties.go')
-rw-r--r--vendor/github.com/golang/protobuf/proto/properties.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go
index 69ddda8..ec2289c 100644
--- a/vendor/github.com/golang/protobuf/proto/properties.go
+++ b/vendor/github.com/golang/protobuf/proto/properties.go
@@ -844,7 +844,15 @@ func RegisterType(x Message, name string) {
}
// MessageName returns the fully-qualified proto name for the given message type.
-func MessageName(x Message) string { return revProtoTypes[reflect.TypeOf(x)] }
+func MessageName(x Message) string {
+ type xname interface {
+ XXX_MessageName() string
+ }
+ if m, ok := x.(xname); ok {
+ return m.XXX_MessageName()
+ }
+ return revProtoTypes[reflect.TypeOf(x)]
+}
// MessageType returns the message type (pointer to struct) for a named message.
func MessageType(name string) reflect.Type { return protoTypes[name] }