跳过正文

Go常用第三方库

·200 字
功能项目备注
日志https://github.com/uber-go/zapgo get -u go.uber.org/zap
日志切割https://github.com/natefinch/lumberjackgo get -u github.com/natefinch/lumberjack.v2
ormhttps://github.com/go-gorm/gormgo get -u gorm.io/gorm
redishttps://github.com/go-redis/redisgo get -u github.com/go-redis/redis/v9
json操作https://github.com/tidwall/gjsongo get -u github.com/tidwall/gjson
json操作https://github.com/tidwall/sjsongo get -u github.com/tidwall/sjson
json序列化https://github.com/bytedance/sonic
配置管理https://github.com/spf13/viper
cli框架https://github.com/spf13/cobra
类型转换https://github.com/spf13/cast
熔断限流https://github.com/alibaba/sentinel-golang文档
redis分布式锁https://github.com/go-redsync/redsync
mockhttps://github.com/agiledragon/gomonkey
时间https://github.com/golang-module/carbon
工具库https://github.com/duke-git/lancet各种工具方法集合
prometheushttps://github.com/prometheus/client_golanggo get -u github.com/prometheus/client_golang
链路追踪go get -u go.opentelemetry.io/otel
maxprocshttps://github.com/uber-go/automaxprocsgo get -u github.com/uber-go/automaxprocs, go1.25应该会解决容器环境cpu核数设置问题
限流https://github.com/uber-go/ratelimitgo get -u go.uber.org/ratelimit
测试框架https://github.com/stretchr/testifygo get -u github.com/stretchr/testify
mockhttps://github.com/agiledragon/gomonkey
swaggerhttps://github.com/swaggo/swag
uuidhttps://github.com/google/uuidgo get -u github.com/google/uuid
rpchttps://github.com/grpc/grpc-gogo get -u google.golang.org/grpc https://grpc.io/docs/languages/go/
服务注册发现https://github.com/etcd-io/etcd

参考