1
0
mirror of https://github.com/golang/go synced 2024-10-05 06:11:21 -06:00
go/src/pkg/gob
Rob Pike c91daefb24 gob: beginning of support for GobEncoder/GobDecoder interfaces.
This allows a data item that can marshal itself to be transmitted by its
own encoding, enabling some types to be handled that cannot be
normally, plus providing a way to use gobs on data with unexported
fields.

In this CL, the necessary methods are protected by leading _, so only
package gob can use the facilities (in its tests, of course); this
code is not ready for real use yet.  I could be talked into enabling
it for experimentation, though.  The main drawback is that the
methods must be implemented by the actual type passed through,
not by an indirection from it.  For instance, if *T implements
GobEncoder, you must send a *T, not a T.  This will be addressed
in due course.

Also there is improved commentary and a couple of unrelated
minor bug fixes.

R=rsc
CC=golang-dev
https://golang.org/cl/4243056
2011-03-04 12:25:18 -08:00
..
codec_test.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00
debug.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00
decode.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00
decoder.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00
doc.go gob: fix the grammar comments to match the encoder 2011-01-21 16:10:39 -08:00
dump.go add a debugging printer to the gob package. 2009-12-29 14:03:33 +11:00
encode.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00
encoder_test.go gob: make recursive map and slice types work. 2011-02-25 09:45:06 -08:00
encoder.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00
error.go gobs: error cleanup part 1. 2010-10-22 15:16:34 -07:00
gobencdec_test.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00
Makefile gobs: error cleanup part 1. 2010-10-22 15:16:34 -07:00
type_test.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00
type.go gob: beginning of support for GobEncoder/GobDecoder interfaces. 2011-03-04 12:25:18 -08:00