Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork246
msgpack.org[Go] MessagePack encoding for Golang
License
vmihailenco/msgpack
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
msgpack is brought to you by ⭐uptrace/uptrace.Uptrace is anopen source APM and blazingly fastdistributed tracing tool poweredby OpenTelemetry and ClickHouse. Give it a star as well!
- Primitives, arrays, maps, structs, time.Time and interface{}.
- Appengine *datastore.Key and datastore.Cursor.
- CustomEncoder/CustomDecoder interfaces for custom encoding.
- Extensions to encodetype information.
- Renaming fields via
msgpack:"my_field_name"and alias viamsgpack:"alias:another_name". - Omitting individual empty fields via
msgpack:",omitempty"tag or allempty fields in a struct. - Map keys sorting.
- Encoding/decoding allstructs as arraysorindividual structs.
- Encoder.SetCustomStructTag withDecoder.SetCustomStructTag can turn msgpack into drop-inreplacement for any tag.
- Simple but very fast and efficientqueries.
msgpack supports 2 last Go versions and requires support forGo modules. So make sure to initialize a Go module:
go mod init github.com/my/repo
And then install msgpack/v5 (notev5 in the import; omitting it is a popular mistake):
go get github.com/vmihailenco/msgpack/v5
import"github.com/vmihailenco/msgpack/v5"funcExampleMarshal() {typeItemstruct {Foostring }b,err:=msgpack.Marshal(&Item{Foo:"bar"})iferr!=nil {panic(err) }varitemItemerr=msgpack.Unmarshal(b,&item)iferr!=nil {panic(err) }fmt.Println(item.Foo)// Output: bar}
- Golang ORM for PostgreSQL, MySQL, MSSQL, and SQLite
- Golang PostgreSQL
- Golang HTTP router
- Golang ClickHouse ORM
Thanks to all the people who already contributed!
About
msgpack.org[Go] MessagePack encoding for Golang
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
