internal/value: rename the Unwrap method as ProtoUnwrap
Add a Proto prefix before the Unwrap method to reduce the probability that
it would ever conflict with a method of the same name that a
custom implementation of Enum, Message, List, or Map may have.
Change-Id: I628bf8335583f2747ab4589f3e6ff82e4501ce98
Reviewed-on: https://go-review.googlesource.com/c/151817
Reviewed-by: Herbie Ong <herbie@google.com>
diff --git a/internal/impl/legacy_enum.go b/internal/impl/legacy_enum.go
index bba130d..497b842 100644
--- a/internal/impl/legacy_enum.go
+++ b/internal/impl/legacy_enum.go
@@ -63,7 +63,7 @@
func (e *legacyEnumWrapper) ProtoReflect() pref.Enum {
return e
}
-func (e *legacyEnumWrapper) Unwrap() interface{} {
+func (e *legacyEnumWrapper) ProtoUnwrap() interface{} {
v := reflect.New(e.goTyp).Elem()
v.SetInt(int64(e.num))
return v.Interface()