]> Cypherpunks repositories - gostls13.git/commit
gob: enable the GobEncoder and GobDecoder interfaces.
authorRob Pike <r@golang.org>
Fri, 4 Mar 2011 22:18:52 +0000 (14:18 -0800)
committerRob Pike <r@golang.org>
Fri, 4 Mar 2011 22:18:52 +0000 (14:18 -0800)
commit9442e9518dc54c0444e44eb0898c6c7ce4d28a4f
tree3a47583d0952f2c4be0358b4e88724245c9784ab
parent99f17aa0b8af774e3639d00d4bc95a2c3a7d153a
gob: enable the GobEncoder and GobDecoder interfaces.
These allow data items to control their own representation.

For now, the implementation requires that the value passed
to Encode and Decode must be exactly the type of the
methods' receiver; it cannot be, for instance, T if the receiver
is of type *T.  This will be fixed in a later CL.

R=rsc
CC=golang-dev
https://golang.org/cl/4235051
src/pkg/gob/decode.go
src/pkg/gob/encode.go
src/pkg/gob/gobencdec_test.go
src/pkg/gob/type.go