前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >我给 ”Go 语言“ 开发了 6 个在线工具我给 ”Go 语言“ 开发了 6 个在线工具

我给 ”Go 语言“ 开发了 6 个在线工具我给 ”Go 语言“ 开发了 6 个在线工具

作者头像
潇洒哥和黑大帅
发布2021-12-07 15:40:48
4770
发布2021-12-07 15:40:48
举报
文章被收录于专栏:WebDeveloperWebDeveloper

工具快速访问

JSON转GO

网址:https://www.printlove.cn/tools/json2go

1. 有两种模式

  • 转化-展开:json中的所有对象都创建为新的struct
  • 转化-嵌套:json中的对象都包含到一个struct中

2. 自定义tag

默认转化后的tagjson,也可以自定义,比如可以改为:gorm

3. 效果图

image

YAML转GO

网址:https://www.printlove.cn/tools/yaml2go

将 yaml 格式自动转化为 Go Struct 结构。

效果图

image

SQL 转 ent

网址:https://printlove.cn/tools/sql2ent

1. 效果图

2. 功能

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

SQL 转 ElasticSearch DSL

网址:https://printlove.cn/tools/sql2es/

1. 效果图

2. 当前支持

  • sql and expression
  • sql or expression
  • equal(=) support
  • not equal(!=) support
  • gt(>) support
  • gte(>=) support
  • lt(<) support
  • lte(<=) support
  • sql in (eg. id in (1,2,3) ) expression
  • sql not in (eg. id not in (1,2,3) ) expression
  • paren bool support (eg. where (a=1 or b=1) and (c=1 or d=1))
  • sql like expression (currently use match phrase, perhaps will change to wildcard in the future)
  • sql order by support
  • sql limit support
  • sql not like expression
  • field missing check
  • support aggregation like count(*), count(field), min(field), max(field), avg(field)
  • support aggregation like stats(field), extended_stats(field), percentiles(field) which are not standard sql function
  • null check expression(is null/is not null)
  • join expression
  • having support

SQL转go-zero

网址:https://printlove.cn/tools/sql2gozero

1. 效果图

image

2. 功能

和官方的 goctl 工具生成的代码是一样的,同样支持是否带缓存的Model。

SQL转GORM Model

网址:https://www.printlove.cn/tools/sql2gorm

1. 效果图

2. 功能

  • 支持多表
  • 支持引入包的导入
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2021/11/29 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 工具快速访问
  • JSON转GO
    • 1. 有两种模式
      • 2. 自定义tag
        • 3. 效果图
        • YAML转GO
          • 效果图
          • SQL 转 ent
            • 1. 效果图
              • 2. 功能
              • SQL 转 ElasticSearch DSL
                • 1. 效果图
                  • 2. 当前支持
                  • SQL转go-zero
                    • 1. 效果图
                      • 2. 功能
                      • SQL转GORM Model
                        • 1. 效果图
                          • 2. 功能
                          领券
                          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档