baishaojie dcf2cbd820 first commit 11 mēneši atpakaļ
..
msgpcode dcf2cbd820 first commit 11 mēneši atpakaļ
.prettierrc dcf2cbd820 first commit 11 mēneši atpakaļ
.travis.yml dcf2cbd820 first commit 11 mēneši atpakaļ
CHANGELOG.md dcf2cbd820 first commit 11 mēneši atpakaļ
LICENSE dcf2cbd820 first commit 11 mēneši atpakaļ
Makefile dcf2cbd820 first commit 11 mēneši atpakaļ
README.md dcf2cbd820 first commit 11 mēneši atpakaļ
commitlint.config.js dcf2cbd820 first commit 11 mēneši atpakaļ
decode.go dcf2cbd820 first commit 11 mēneši atpakaļ
decode_map.go dcf2cbd820 first commit 11 mēneši atpakaļ
decode_number.go dcf2cbd820 first commit 11 mēneši atpakaļ
decode_query.go dcf2cbd820 first commit 11 mēneši atpakaļ
decode_slice.go dcf2cbd820 first commit 11 mēneši atpakaļ
decode_string.go dcf2cbd820 first commit 11 mēneši atpakaļ
decode_value.go dcf2cbd820 first commit 11 mēneši atpakaļ
encode.go dcf2cbd820 first commit 11 mēneši atpakaļ
encode_map.go dcf2cbd820 first commit 11 mēneši atpakaļ
encode_number.go dcf2cbd820 first commit 11 mēneši atpakaļ
encode_slice.go dcf2cbd820 first commit 11 mēneši atpakaļ
encode_value.go dcf2cbd820 first commit 11 mēneši atpakaļ
ext.go dcf2cbd820 first commit 11 mēneši atpakaļ
go.mod dcf2cbd820 first commit 11 mēneši atpakaļ
go.sum dcf2cbd820 first commit 11 mēneši atpakaļ
intern.go dcf2cbd820 first commit 11 mēneši atpakaļ
msgpack.go dcf2cbd820 first commit 11 mēneši atpakaļ
package.json dcf2cbd820 first commit 11 mēneši atpakaļ
safe.go dcf2cbd820 first commit 11 mēneši atpakaļ
time.go dcf2cbd820 first commit 11 mēneši atpakaļ
types.go dcf2cbd820 first commit 11 mēneši atpakaļ
unsafe.go dcf2cbd820 first commit 11 mēneši atpakaļ
version.go dcf2cbd820 first commit 11 mēneši atpakaļ

README.md

MessagePack encoding for Golang

Build Status PkgGoDev Documentation Chat

:heart: 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
}