MCPcopy
hub / github.com/vmihailenco/msgpack

github.com/vmihailenco/msgpack @v5.4.1 sqlite

repository ↗ · DeepWiki ↗ · release v5.4.1 ↗
538 symbols 1,508 edges 32 files 79 documented · 15%
README

MessagePack encoding for Golang

Build Status PkgGoDev Documentation Chat

msgpack is brought to you by :star: uptrace/uptrace. Uptrace is an open source APM and blazingly fast distributed tracing tool powered by OpenTelemetry and ClickHouse. Give it a star as well!

Resources

Features

Installation

msgpack supports 2 last Go versions and requires support for Go modules. So make sure to initialize a Go module:

go mod init github.com/my/repo

And then install msgpack/v5 (note v5 in the import; omitting it is a popular mistake):

go get github.com/vmihailenco/msgpack/v5

Quickstart

import "github.com/vmihailenco/msgpack/v5"

func ExampleMarshal() {
    type Item struct {
        Foo string
    }

    b, err := msgpack.Marshal(&Item{Foo: "bar"})
    if err != nil {
        panic(err)
    }

    var item Item
    err = msgpack.Unmarshal(b, &item)
    if err != nil {
        panic(err)
    }
    fmt.Println(item.Foo)
    // Output: bar
}

See also

Contributors

Thanks to all the people who already contributed!

Extension points exported contracts — how you extend this code

Marshaler (Interface)
(no doc) [6 implementers]
msgpack.go
Value (Interface)
(no doc)
msgpack_test.go
MarshalerUnmarshaler (Interface)
(no doc)
ext.go
Unmarshaler (Interface)
(no doc) [6 implementers]
msgpack.go
CustomDecoder (Interface)
(no doc) [5 implementers]
msgpack.go
CustomEncoder (Interface)
(no doc) [4 implementers]
msgpack.go

Core symbols most depended-on inside this repo

Encode
called by 50
encode.go
readCode
called by 28
decode.go
Decode
called by 27
decode.go
EncodeNil
called by 22
encode.go
EncodeString
called by 17
encode_slice.go
DecodeInterface
called by 15
decode.go
writeCode
called by 14
encode.go
DecodeString
called by 13
decode_string.go

Shape

Method 231
Function 218
Struct 65
TypeAlias 12
Interface 10
FuncType 2

Languages

Go100%

Modules by API surface

types_test.go60 symbols
msgpack_test.go56 symbols
decode.go40 symbols
bench_test.go39 symbols
encode_number.go36 symbols
encode.go31 symbols
decode_number.go29 symbols
types.go26 symbols
ext.go21 symbols
encode_value.go18 symbols
decode_map.go15 symbols
encode_slice.go14 symbols

Dependencies from manifests, versioned

github.com/pmezard/go-difflibv1.0.0 · 1×
github.com/vmihailenco/tagparser/v2v2.0.0 · 1×
google.golang.org/appenginev1.6.7 · 1×
gopkg.in/yaml.v3v3.0.0-2020031310205 · 1×

For agents

$ claude mcp add msgpack \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact