package gob

Import Path
	encoding/gob (on and

Dependency Relation
	imports 14 packages, and imported by one package

Involved Source Files
	d-> doc.go

Exported Type Names

type CommonType (struct) CommonType holds elements of all types. It is a historical artifact, kept for binary compatibility and exported only for the benefit of the package's encoding of type descriptors. It is not intended for direct use by clients. Id typeId Name string
type Decoder (struct) A Decoder manages the receipt of type and data information read from the remote side of a connection. It is safe for concurrent use by multiple goroutines. The Decoder does only basic sanity checking on decoded input sizes, and its limits are not configurable. Take caution when decoding gob data from untrusted sources. (*T) Decode(e interface{}) error (*T) DecodeValue(v reflect.Value) error func NewDecoder(r io.Reader) *Decoder
type Encoder (struct) An Encoder manages the transmission of type and data information to the other side of a connection. It is safe for concurrent use by multiple goroutines. (*T) Encode(e interface{}) error (*T) EncodeValue(value reflect.Value) error func NewEncoder(w io.Writer) *Encoder
type GobDecoder (interface) GobDecoder is the interface describing data that provides its own routine for decoding transmitted values sent by a GobEncoder. (T) GobDecode([]byte) error math/big.(*Float) math/big.(*Int) math/big.(*Rat) time.(*Time)
type GobEncoder (interface) GobEncoder is the interface describing data that provides its own representation for encoding values for transmission to a GobDecoder. A type that implements GobEncoder and GobDecoder has complete control over the representation of its data and may therefore contain things such as private fields, channels, and functions, which are not usually transmissible in gob streams. Note: Since gobs can be stored permanently, it is good design to guarantee the encoding used by a GobEncoder is stable as the software evolves. For instance, it might make sense for GobEncode to include a version number in the encoding. (T) GobEncode() ([]byte, error) math/big.(*Float) math/big.(*Int) math/big.(*Rat) time.Time
Exported Values
func NewDecoder(r io.Reader) *Decoder NewDecoder returns a new decoder that reads from the io.Reader. If r does not also implement io.ByteReader, it will be wrapped in a bufio.Reader.
func NewEncoder(w io.Writer) *Encoder NewEncoder returns a new encoder that will transmit on the io.Writer.
func Register(value interface{}) Register records a type, identified by a value for that type, under its internal type name. That name will identify the concrete type of a value sent or received as an interface variable. Only types that will be transferred as implementations of interface values need to be registered. Expecting to be used only during initialization, it panics if the mapping between types and names is not a bijection.
func RegisterName(name string, value interface{}) RegisterName is like Register but uses the provided name rather than the type's default.