goprotobuf: Return a clear failure if a non pointer-to-struct is passed to Marshal/Unmarshal.
R=r
CC=golang-dev
http://codereview.appspot.com/5989064
diff --git a/proto/encode.go b/proto/encode.go
index a64de1f..1248e97 100644
--- a/proto/encode.go
+++ b/proto/encode.go
@@ -62,8 +62,8 @@
// ErrNil is the error returned if Marshal is called with nil.
ErrNil = errors.New("proto: Marshal called with nil")
- // ErrNotPtr is the error returned if Marshal is called with a non-pointer.
- ErrNotPtr = errors.New("proto: Marshal called with a non-pointer")
+ // ErrNotPtr is the error returned if Marshal is called with something other than a pointer to a struct.
+ ErrNotPtr = errors.New("proto: Marshal called with something other than a pointer to a struct")
)
// The fundamental encoders that put bytes on the wire.