1 Star 0 Fork 0

sun/common_pkg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
msgpack_encoding.go 459 Bytes
一键复制 编辑 原始数据 按行查看 历史
yzsunjianguo 提交于 2023-09-19 21:35 . init
package encoding
import "github.com/vmihailenco/msgpack"
// MsgPackEncoding msgpack format
type MsgPackEncoding struct{}
// Marshal msgpack encode
func (mp MsgPackEncoding) Marshal(v interface{}) ([]byte, error) {
buf, err := msgpack.Marshal(v)
return buf, err
}
// Unmarshal msgpack decode
func (mp MsgPackEncoding) Unmarshal(data []byte, value interface{}) error {
err := msgpack.Unmarshal(data, value)
if err != nil {
return err
}
return nil
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/jianguosun_admin/common_pkg.git
git@gitee.com:jianguosun_admin/common_pkg.git
jianguosun_admin
common_pkg
common_pkg
v1.0.4

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385