pickle

package
v0.0.0-...-a0bb070 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilMap            = errors.New("unable to assign map from non-map")
	ErrNilSlice          = errors.New("unable to assign slice from non-slice")
	ErrUnknownType       = errors.New("assign to unknown type")
	ErrEmptyStack        = errors.New("empty stack")
	ErrMarkNotFound      = errors.New("unable to find mark")
	ErrInvalidSyntax     = errors.New("invalid syntax")
	ErrUnhashableTuple   = errors.New("unhashable tuple entry")
	ErrInvalidMapKeyType = errors.New("invalid map key type")
	ErrIncompletePickle  = errors.New("incomplete pickle: fell out of loop")
)

Functions

func Marshal

func Marshal(v interface{}) ([]byte, error)

func PickleDumps

func PickleDumps(o interface{}) []byte

func PickleLoads

func PickleLoads(data []byte) (interface{}, error)

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

parses the pickled data and stores the result in the value pointed to by v. Unmarshal is considerably less performant than PickleLoads, so think twice before using it in performance-sensitive code.

Types

type PickleArray

type PickleArray struct {
	Type string
	Data []interface{}
}

type PickleTuple

type PickleTuple struct {
	Len int
	A   interface{}
	B   interface{}
	C   interface{}
	D   interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL