Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Gob is a Codec that uses the gob package. Gob = Codec{gobMarshal, gobUnmarshal} // JSON is a Codec that uses the json package. // JSON = Codec{json.Marshal, json.Unmarshal} JSON = jsoniter.ConfigCompatibleWithStandardLibrary )
View Source
var ( GobIO = CodecIO{gobWriterMarshal, gobReaderUnmarshal} JSONIO = CodecIO{jsonWriterMarshal, jsonReaderUnmarshal} )
Functions ¶
Types ¶
type Codec ¶
type Codec struct { Marshal func(interface{}) ([]byte, error) Unmarshal func([]byte, interface{}) error }
Codec 参考https://github.com/golang/appengine/blob/master/memcache/memcache.go
Click to show internal directories.
Click to hide internal directories.