Files
mostlymatter/vendor/github.com/vmihailenco/msgpack/v5
Agniva De Sarker 189d447591 MM-39315: Bump dependencies (#19039)
Note: We keep splitio/go-client untouched
because the dependency is broken.

See https://github.com/mattermost/mattermost-server/pull/18604

```release-note
NONE
```
2021-11-24 19:45:28 +05:30
..
2021-11-24 19:45:28 +05:30
2021-06-03 12:59:05 +05:30
2021-03-25 14:45:13 +05:30
2021-03-25 14:45:13 +05:30
2021-03-09 11:26:42 +05:30
2021-11-24 19:45:28 +05:30
2021-11-24 19:45:28 +05:30
2021-06-03 12:59:05 +05:30

MessagePack encoding for Golang

Build Status PkgGoDev Documentation Chat

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

Other projects you may like:

  • Bun - fast and simple SQL client for PostgreSQL, MySQL, and SQLite.
  • BunRouter - fast and flexible HTTP router for Go.

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
}