go程序员日常开发效率神器汇总
作者:腾讯技术工程 发布时间:2024-02-16 23:04:40
一. 开发工具
1)sql2go
用于将 sql 语句转换为 golang 的 struct. 使用 ddl 语句即可。
例如对于创建表的语句: show create table xxx. 将输出的语句,直接粘贴进去就行。
http://stming.cn/tool/sql2go.html
2)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
模拟模板的工具,在支持泛型之前,可以考虑使用。
https://github.com/cheekybits/genny
7)查看某一个库的依赖情况,类似于 go list 功能
https://github.com/KyleBanks/depth
8)一个好用的文件压缩和解压工具,集成了 zip,tar 等多种功能,主要还有跨平台。
https://github.com/mholt/archiver
9)go 内置命令
go list 可以查看某一个包的依赖关系.
go vet 可以检查代码不符合 golang 规范的地方。
10)热编译工具
https://github.com/silenceper/gowatch
11)revive
golang 代码质量检测工具
https://github.com/mgechev/revive
12)Go Callvis
golang 的代码调用链图工具
https://github.com/TrueFurby/go-callvis
13)Realize
开发流程改进工具
https://github.com/oxequa/realize
14)Gotests
自动生成测试用例工具
https://github.com/cweill/gotests
二.调试工具
1)perf
代理工具,支持内存,cpu,堆栈查看,并支持火焰图.
perf 工具和 go-torch 工具,快捷定位程序问题.
https://github.com/uber-archive/go-torchhttps://github.com/google/gops
2)dlv 远程调试
基于 goland+dlv 可以实现远程调式的能力.
https://github.com/go-delve/delve提供了对 golang 原生的支持,相比 gdb 调试,简单太多。
3) * 工具
goproxy 代理,支持多种协议,支持 ssh 穿透和 kcp 协议.
https://github.com/snail007/goproxy
4)抓包工具
go-sniffer 工具,可扩展的抓包工具,可以开发自定义协议的工具包. 现在只支持了 http,mysql,redis,mongodb.
基于这个工具,我们开发了 qapp 协议的抓包。
https://github.com/40t/go-sniffer
5)反向代理工具,快捷开放内网端口供外部使用。
ngrok 可以让内网服务外部调用
https://ngrok.com/https://github.com/inconshreveable/ngrok
6)配置化生成证书
从根证书,到业务侧证书一键生成.
https://github.com/cloudflare/cfssl
7)免费的证书获取工具
基于 acme 协议,从 letsencrypt 生成免费的证书,有效期 1 年,可自动续期。
https://github.com/Neilpang/acme.sh
8)开发环境管理工具,单机搭建可移植工具的利器。支持多种虚拟机后端。
vagrant常被拿来同 docker 相比,值得拥有。
https://github.com/hashicorp/vagrant
9)轻量级容器调度工具
nomad 可以非常方便的管理容器和传统应用,相比 k8s 来说,简单不要太多.
https://github.com/hashicorp/nomad
10)敏感信息和密钥管理工具
https://github.com/hashicorp/vault
11)高度可配置化的 http 转发工具,基于 etcd 配置。
https://github.com/gojek/weaver
12)进程监控工具 supervisor
https://www.jianshu.com/p/39b476e808d8
13)基于procFile进程管理工具. 相比 supervisor 更加简单。
https://github.com/ddollar/foreman
14)基于 http,https,websocket 的调试代理工具,配置功能丰富。在线教育的 nohost web 调试工具,基于此开发.
https://github.com/avwo/whistle
15)分布式调度工具
https://github.com/shunfei/cronsun/blob/master/README_ZH.mdhttps://github.com/ouqiang/gocron
16)自动化运维平台 Gaia
https://github.com/gaia-pipeline/gaia
三. 常用网站
go 百科全书: https://awesome-go.com/
json 解析: http://tools.jb51.net/code/jsonformat
出口 IP: https://ipinfo.io/
redis 命令: http://doc.redisfans.com/
ES 命令首页: https://www.elastic.co/guide/cn/elasticsearch/guide/current/index.html
UrlEncode: http://tools.jb51.net/transcoding/urlencode_decode
Base64: http://tools.jb51.net/transcoding/base64
Guid: https://www.guidgen.com/
常用工具: http://tools.jb51.net/
四. 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-tagexpr
protobuf 文件动态解析的接口,可以实现反射相关的能力。
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/tagl
来源:https://www.zhihu.com/question/22867411/answer/911161400


猜你喜欢
- 阅读上一篇文章《WEB2.0网页制作标准教程(5)head区的其他设置》在开始正式内容制作之前,我们必须先了解一下web标准有关代码的规范。
- GetRepeatTimes(TheChar,TheString) 得到一个字符串在另一个字符串当中出现几次的函数(新)如:response
- 1.写在前面JS要实现下载功能,一般都是这么几个过程:生成下载的URL,动态创建一个A标签,并将其href指向生成的URL,然后触发A标签的
- 最流行的数据交换格式之一是 CSV 格式。是需要通过键盘和控制台以外的方式将信息输入和输出的程序,通过文本文件交换信息是在程序之间共享信息的
- 本文是 《用 Golang 实现一个 Redis》系列文章第二篇,本文将分别介绍Redis 通信协议 以及 协议解析器 的实现,若您对协议有
- 本文实例讲述了Python实现的网页截图功能。分享给大家供大家参考,具体如下:方法一、使用PyQt4的QtWebKit组件#!/usr/bi
- 先来看看js中的Null类型表示什么?null用来表示尚未存在的对象,常用来表示函数企图返回一个不存在的对象,一般一个未定义的变量在初次使用
- Event事件用来控制线程的执行出现e.wait(),就会把这个线程设置为False,就不能执行这个任务;只要有一个线程出现e.set(),
- Golang HTTP服务在上线时,需要重新编译可执行文件,关闭正在运行的进程,然后再启动新的运行进程。对于访问频率比较高的面向终端用户的产
- 前言之前做了一个校园交友的APP,其中一个逻辑是通过用户的教务系统来确认用户是一名在校大学生,基本的想法是通过用户的账号和密码,用爬虫的方法
- 理解新概念Python V2.2 中引入了迭代器的思想。唔,这并不十分正确;这种思想的“苗头”早已出现在较老的函数 xrange() 以及文
- 本文为大家分享了pygame游戏之旅的第14篇,供大家参考,具体内容如下添加icon需要用的函数是:gameIcon = pygame.im
- 为数据库配置比较大的内存,可以有效提高数据库性能。因为数据库在运行过程中,会在内存中划出一块区域来作为数据缓存。通常情况下,用户访问数据库时
- 记录日志是我们程序中必不可少的一个功能,但是日志文件如果没有合理的管理,时间长了几百兆的日志文件就很难分析了(都不想打开看),但是又不可能经
- 大家经常在网上登陆的时候经常会看到让你输入验证码,有的是文字的,有的呢是图片,比如chinaren.com校友录中留言的时候,我们就会看到数
- 我就废话不多说啦,还是直接看代码吧! from example.commons import Faker from pyecharts im
- 最近 PEP 570被接受了,其实要加的这个Positional-Only Parameters原来在内置的C函数上有很多都用到了:In :
- 本文实例为大家分享了用python画一朵花的具体代码,供大家参考,具体内容如下第一种,画法from turtle import *impor
- 说明视频剪辑时需要为视频添加字幕,添加字幕方法之一:根据字幕文本文件批量生成透明底只有字幕内容的图片文件,如下图,然后将这些图片文件添加到视
- SNMP标准引入一组ASN.1语言元素,称之为SMI(Structure of Management Information)。由SMI描述