↓ 跳过正文
  1. 文章/

golang msgpack

·1 分钟·

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

相关文章

编译Win程序运行报错:go-sqlite3 requires cgo to work

·1 分钟
编译号程序放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

Golang HTTP 请求同时支持 gzip deflate Brotli 编码

·1 分钟
可利用 https://github.com/andybalholm/brotli 加个简单判断就支持br压缩 😀。 go 语言 http 默认未传递Accept-Encoding参数会自动支持gzip压缩, 😱 一旦修改此标记所有解码都需要自己来处理,我选用https://github.com/klauspost/compress解压。