tobi f2e5bedea6
migrate go version to 1.17 (#203)
* migrate go version to 1.17

* update contributing
2021-09-10 14:42:14 +02:00
..
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00
2021-08-12 21:03:24 +02:00

MessagePack encoding for Golang

Build Status PkgGoDev Documentation Chat

❤️ Uptrace.dev - All-in-one tool to optimize performance and monitor errors & logs

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