这个库github.com/shamaton/msgpack/v2速度真是快,可是不如github.com/vmihailenco/msgpack/v5兼容性好(它支持omitempty标记)

编译号程序放Windows运行报错

Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub, 按照下面参数编译就正常了

env CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ GOOS=windows GOARCH=amd64  go build

安装 看看?

apt-get install gcc-multilib
apt-get install gcc-mingw-w64