gotosocial/vendor/github.com/vmihailenco/msgpack/v5
2024-01-15 14:08:07 +01:00
..
msgpcode Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
.prettierrc Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
.travis.yml Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
CHANGELOG.md [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
commitlint.config.js Update dependencies (#333) 2021-11-27 15:26:58 +01:00
decode_map.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
decode_number.go Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
decode_query.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
decode_slice.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
decode_string.go Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
decode_typgen.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
decode_value.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
decode.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
encode_map.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
encode_number.go Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
encode_slice.go Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
encode_value.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
encode.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
ext.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
intern.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
LICENSE Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
Makefile Update dependencies (#333) 2021-11-27 15:26:58 +01:00
msgpack.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
package.json [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
README.md [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
safe.go Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
time.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
types.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00
unsafe.go Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
version.go [chore] update bun + extras v1.1.16 -> v1.1.17 (#2534) 2024-01-15 14:08:07 +01:00

MessagePack encoding for Golang

Build Status PkgGoDev Documentation Chat

msgpack is brought to you by 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!