MCPcopy
hub / github.com/tdewolff/canvas / GobEncode

Method GobEncode

path.go:152–159  ·  view source on GitHub ↗

GobEncode implements the gob interface.

()

Source from the content-addressed store, hash-verified

150
151// GobEncode implements the gob interface.
152func (p *Path) GobEncode() ([]byte, error) {
153 b := bytes.Buffer{}
154 enc := gob.NewEncoder(&b)
155 if err := enc.Encode(p.d); err != nil {
156 return nil, err
157 }
158 return b.Bytes(), nil
159}
160
161// GobDecode implements the gob interface.
162func (p *Path) GobDecode(b []byte) error {

Callers

nothing calls this directly

Calls 2

EncodeMethod · 0.65
BytesMethod · 0.65

Tested by

no test coverage detected