MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / Marshal

Method Marshal

pkg/encoding/msgpack_encoding.go:9–12  ·  view source on GitHub ↗

Marshal msgpack encode

(v interface{})

Source from the content-addressed store, hash-verified

7
8// Marshal msgpack encode
9func (mp MsgPackEncoding) Marshal(v interface{}) ([]byte, error) {
10 buf, err := msgpack.Marshal(v)
11 return buf, err
12}
13
14// Unmarshal msgpack decode
15func (mp MsgPackEncoding) Unmarshal(data []byte, value interface{}) error {

Callers 1

BenchmarkMsgpackFunction · 0.95

Calls 1

MarshalMethod · 0.65

Tested by 1

BenchmarkMsgpackFunction · 0.76