源自鹅厂开发人员GG们常见的工作效率辅助工具撷取
一. 开发辅助工具
1)sql2go
用作将 sql 句子切换为 golang 的 struct. 采用 ddl 句子方可。
比如对建立表的句子: show create table xxx. 将输入的句子,间接黏贴进来xml。
http://stming.cn/tool/sql2go.html2)toml2go
用作将标识符后的 toml 文档切换问 golang 的 struct.
https://xuri.me/toml-to-go/3)curl2go
用以将 curl 指示转化成为具体内容的 golang 标识符.
https://mholt.github.io/curl-to-go/4)json2go
用作将 json 文档切换为 struct.
https://mholt.github.io/json-to-go/5)mysql 转 ES 辅助工具http://www.ischoolbar.com/EsParser/
6)golang
演示模版的辅助工具,在全力支持C#以后,能考量采用。
https://github.com/cheekybits/genny7)查看某一个库的依赖情况,类似于 go list 功能https://github.com/KyleBanks/depth
8)一个好用的文件压缩和解压辅助工具,集成了 zip,tar 等多种功能,主要还有跨平台。
https://github.com/mholt/archiver9)go 内置指示
go list 能查看某一个包的依赖关系.
go vet 能检查标识符不符合 golang 规范的地方。10)热编译辅助工具https://github.com/silenceper/gowatch
11)revive
golang 标识符质量检测辅助工具
https://github.com/mgechev/revive12)Go Callvis
golang 的标识符调用链图辅助工具
https://github.com/TrueFurby/go-callvis13)Realize
开发流程改进辅助工具
https://github.com/oxequa/realize14)Gotests
自动生成测试用例辅助工具
https://github.com/cweill/gotests二.调试辅助工具
1)perf
代理辅助工具,全力支持内存,cpu,堆栈查看,并全力支持火焰图.
perf 辅助工具和 go-torch 辅助工具,快捷定位程序问题.
https://github.com/uber-archive/go-torchhttps://github.com/google/gops2)dlv 远程调试
基于 goland+dlv 能实现远程调试的能力.
https://github.com/go-delve/delve提供了对 golang 原生的全力支持,相比 gdb 调试,简单太多。3)网络代理辅助工具
goproxy 代理,全力支持多种协议,全力支持 ssh 穿透和 kcp 协议.
https://github.com/snail007/goproxy4)抓包辅助工具
go-sniffer 辅助工具,可扩展的抓包辅助工具,能开发自定义协议的辅助工具包. 现在只全力支持了 http,mysql,redis,mongodb.
基于这个辅助工具,我们开发了 qapp 协议的抓包。
https://github.com/40t/go-sniffer5)反向代理辅助工具,快捷开放内网端口供外部采用。
ngrok 能让内网服务外部调用
https://ngrok.com/
https://github.com/inconshreveable/ngrok6)配置化生成证书
从根证书,到业务侧证书一键生成.
https://github.com/cloudflare/cfssl基于 acme 协议,从 letsencrypt 生成免费的证书,有效期 1 年,可自动续期。
https://github.com/Neilpang/acme.sh8)开发环境管理辅助工具,单机搭建可移植辅助工具的利器。全力支持多种虚拟机后端。
vagrant常被拿来同 docker 相比,值得拥有。
https://github.com/hashicorp/vagrant9)轻量级容器调度辅助工具
nomad 能非常方便的管理容器和传统应用,相比 k8s 来说,简单不要太多.
https://github.com/hashicorp/nomad10)敏感信息和密钥管理辅助工具https://github.com/hashicorp/vault
11)高度可配置化的 http 转发辅助工具,基于 etcd 配置。https://github.com/gojek/weaver
12)进程监控辅助工具 supervisorhttps://www.jianshu.com/p/39b476e808d8
13)基于procFile
进程管理辅助工具. 相比 supervisor 更加简单。
https://github.com/ddollar/foreman14)基于 http,https,websocket 的调试代理辅助工具
,配置功能丰富。在线教育的 nohost web 调试辅助工具,基于此开发.
https://github.com/avwo/whistle15)分布式调度辅助工具https://github.com/shunfei/cronsun/blob/master/README_ZH.mdhttps://github.com/ouqiang/gocron
16)自动化运维平台 Gaiahttps://github.com/gaia-pipeline/gaia
三. 网络辅助工具
四. 常见网站
go 百科全书: https://awesome-go.com/
json 解析: https://www.json.cn/
出口 IP: https://ipinfo.io/
redis 指示: http://doc.redisfans.com/
ES 指示首页:
https://www.elastic.co/guide/cn/elasticsearch/guide/current/index.htmlUrlEncode:
http://tool.chinaz.com/Tools/urlencode.aspxBase64:
https://tool.oschina.net/encrypt?type=3Guid: https://www.guidgen.com/
常见辅助工具: http://www.ofmonkey.com/五. golang 常见库
日志https://github.com/Sirupsen/logrushttps://github.com/uber-go/zap
配置
兼容 json,toml,yaml,hcl 等格式的日志库.
https://github.com/spf13/viper存储
mysql
https://github.com/go-xorm/xormes
https://github.com/elastic/elasticsearchredis
https://github.com/gomodule/redigomongo
https://github.com/mongodb/mongo-go-driverkafka
https://github.com/Shopify/sarama数据结构https://github.com/emirpasic/gods
指示行https://github.com/spf13/cobra
框架https://github.com/grpc/grpc-gohttps://github.com/gin-gonic/gin
并发https://github.com/Jeffail/tunnyhttps://github.com/benmanns/goworker
现在我们框架在用的,虽然 star 不多,但是确实好用,当然还能更好用.
https://github.com/rafaeldias/async辅助工具
定义了新颖的判定类,以及针对结构体的校验逻辑,避免业务侧写复杂的标识符.
https://github.com/asaskevich/govalidatorhttps://github.com/bytedance/go-tagexprprotobuf 文件动态解析的接口,能实现反射相关的能力。
https://github.com/jhump/protoreflect表达式引擎辅助工具https://github.com/Knetic/govaluatehttps://github.com/google/cel-go
字符串处理https://github.com/huandu/xstrings
ratelimit 辅助工具https://github.com/uber-go/ratelimithttps://blog.csdn.net/chenchongg/article/details/85342086https://github.com/juju/ratelimit
golang 熔断的库
熔断除了考量频率限制,还要考量 qps,出错率等其他东西.
https://github.com/afex/hystrix-gohttps://github.com/sony/gobreaker表格https://github.com/chenjiandongx/go-echarts
tail 辅助工具库https://github.com/hpcloud/taglshi
六、Mac 上值得安装的些神器
(1)brew 安装:(2)brew cask 安装
(3)其他辅助工具
下载辅助工具 motrix看/截图辅助工具 jietubrew cask tools list快速查看辅助工具 Nicer plugins for QuickLookszrz插件