Go 效率工具集合

目前 5 个工具,在线就可以直接使用,如果没有你想要的工具,可以留言告诉我。
工具快速访问
下面有各个工具的简单介绍。
SQL 转 ent
1. 效果图

2. 功能
此工具提供将 SQL 语句转化为
ent schema
提供常见的数据库类型到 field 函数的转化
YAML 转 GO
1. 效果图

2. 功能
将 Yaml 文件内容转化为 Go Struct。
SQL 转 go-zero
1. 效果图

2. 功能
和官方的 goctl 工具生成的代码是一样的,同样支持是否带缓存的 Model。
SQL 转 GORM Model
1. 效果图

2. 功能
支持多表
支持引入包的导入
JSON 转 GO
1. 有两种模式:
转化-展开:json 中的所有对象都创建为新的 struct
转化-嵌套:json 中的对象都包含到一个 struct 中
2. 自定义 tag
默认转化后的tag
是json
,也可以自定义,比如可以改为:gorm
3. 效果图

版权声明: 本文为 InfoQ 作者【潇洒哥 - 老苗】的原创文章。
原文链接:【http://xie.infoq.cn/article/9641ab1c824027e580be85afd】。
本文遵守【CC-BY 4.0】协议,转载请保留原文出处及本版权声明。
评论