pickle

package
v0.15.14 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 4 Imported by: 5 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

A Writer is capable writing out the opcodes required by the pickle format. Note that this is a very limited implementation of pickling; just enough for us to implement the opcodes required by graphite /render.

func NewWriter

func NewWriter(w io.Writer) *Writer

NewWriter creates a new pickle writer.

func (*Writer) BeginDict

func (p *Writer) BeginDict()

BeginDict starts marshalling a python dict.

func (*Writer) BeginList

func (p *Writer) BeginList()

BeginList begins writing a new python list.

func (*Writer) Close

func (p *Writer) Close() error

Close closes the writer, marking the end of the stream and flushing any pending values.

func (*Writer) EndDict

func (p *Writer) EndDict()

EndDict ends marshalling a python dict.

func (*Writer) EndList

func (p *Writer) EndList()

EndList ends writing a python list.

func (*Writer) WriteDictKey

func (p *Writer) WriteDictKey(s string)

WriteDictKey writes a dictionary key.

func (*Writer) WriteFloat64

func (p *Writer) WriteFloat64(v float64)

WriteFloat64 writes a float64 value. NaNs are converted in `None`.

func (*Writer) WriteInt

func (p *Writer) WriteInt(n int)

WriteInt writes an int value.

func (*Writer) WriteNone

func (p *Writer) WriteNone()

WriteNone writes a python `None`.

func (*Writer) WriteString

func (p *Writer) WriteString(s string)

WriteString writes a python string.

Jump to

Keyboard shortcuts

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