Documentation
¶
Index ¶
Constants ¶
View Source
const ( DecodingIntoNilObject = errors.Template("Illegal attempt to decode into a nil object.") EncodingVersion = errors.Template("Encoding version %d not supported.") DecodingIntoExistingObject = errors.Template("Illegal attempt to decode into an existing object.") )
Common errors.
Variables ¶
This section is empty.
Functions ¶
func NewDecoder ¶
NewDecoder returns a new decoder for the given slice of bytes.
func ReuseEncoder ¶
func ReuseEncoder(enc *Encoder)
ReuseEncoder returns the given encoder to a pool ready for reuse by subsequent calls to NewEncoder.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder provides a gob encoder backed by a bytes buffer.
func (*Encoder) Encode ¶
Encode transmits the data item represented by the empty interface value, guaranteeing that all necessary type information has been transmitted first.
func (*Encoder) EncodeValue ¶
EncodeValue transmits the data item represented by the reflection value, guaranteeing that all necessary type information has been transmitted first.
Click to show internal directories.
Click to hide internal directories.