]> Cypherpunks repositories - gostls13.git/commit
encoding/gob: ignore chan and func fields of structures
authorRob Pike <r@golang.org>
Mon, 16 Sep 2013 00:26:23 +0000 (10:26 +1000)
committerRob Pike <r@golang.org>
Mon, 16 Sep 2013 00:26:23 +0000 (10:26 +1000)
commit1fba73de45884012f9f632160b8985029ab0e5a8
treea1e6048f13ba014d581f01ce4b568ef3fc42c62c
parent6d68fc8eeaf32375eda7208b62cedf6ee5d241d0
encoding/gob: ignore chan and func fields of structures

Previously, fields of type chan or func caused an error.
Now we just treat them like unexported fields and ignore them.
This makes it easier to guarantee long-term compatibilty since
a substructure from another package cannot break gob
encoding by adding a func or chan field.

Fixes #6071

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13693043
src/pkg/encoding/gob/codec_test.go
src/pkg/encoding/gob/doc.go
src/pkg/encoding/gob/encode.go
src/pkg/encoding/gob/encoder.go
src/pkg/encoding/gob/encoder_test.go
src/pkg/encoding/gob/type.go