gostruct, mysql, json生成proto

2637309949 · 2021-10-14 15:45:10 · 1321 次点击 · 大约8小时之前 开始浏览    置顶
这是一个创建于 2021-10-14 15:45:10 的主题,其中的信息可能已经有所发展或是发生改变。

file2proto, a utility that can convert struct, mysql, json and http into proto

Install

go get -u github.com/2637309949/file2proto

Syntax

file2proto
  -i string
        Fully qualified uri path
  -o string
        Protobuf output file. (default "messages.proto")

Example

file2proto -i ./ -o messages.proto
2021/10/14 18:57:10 output file written to /helloworld-service/srv/types/messages.proto
file2proto -i "mysql://myppdb:myppdb@tcp(127.0.0.1:3306)/db_psycinves"
2021/10/14 18:57:10 output file written to /helloworld-service/srv/types/messages.proto
file2proto -i ./test.json
2021/10/15 23:21:05 output file written to messages.proto
file2proto -i "https://help.aliyun.com/api/v2/recommend/doc?idList=209974&limit=6&isMobile=false"
2021/10/15 23:16:32 output file written to messages.proto

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1321 次点击  ∙  1 赞  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传