From 9d45d39eba3807c41dff74cd2d84109d226f2c0f Mon Sep 17 00:00:00 2001 From: hantmac Date: Tue, 31 Mar 2020 18:46:36 +0800 Subject: [PATCH] update readme --- README.md | 22 ++++++++++++++++++++++ README_zh.md | 24 ++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/README.md b/README.md index f052cbf..2ea0952 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,28 @@ Only a few clicks on the web UI can generate the corresponding golang struct wit - Boom!Enjoy your coffee and copy your struct code. ![](https://tva1.sinaimg.cn/large/006tNbRwly1g9w531osobj31u90u0jzq.jpg) +### fuckdb CMD +If you don't want to use the web UI, you have a more fast way to generate struct - fuckdb cmd. +- First, edit the fuckdb.json in `./fuckdb/cmd` to add your mysql info +``` +{ + "db": { + "host": "localhost", + "port": 3306, + "password": "password", + "user": "root", + "table": "cars", + "database": "example", + "packageName": "test", + "structName": "test", + "jsonAnnotation": true, + "gormAnnotation": true + } +} +``` +- `go run fuckdb_cmd.gom` then copy your code and enjoy it. + +In `fuckdb/cmd` you can find exec file for different os. ### Support diff --git a/README_zh.md b/README_zh.md index d73e85b..1d3a719 100644 --- a/README_zh.md +++ b/README_zh.md @@ -39,4 +39,28 @@ type InsInfo struct { 上面的GIF展示了增加了缓存功能的版本,记忆你之前填写过的数据库信息,省去了大量重复的操作,你不用再填写繁琐的数据库名,表名,等等,只需一键,就可以得到对应的代码,是不是很方便啊。ps:目前数据库信息没有做加密,所以不方便放到公网上使用,仅限于内网,后面会进行相应的开发支持。目前这个工具在我们组内已经开始使用,反馈比较好,节省了很多重复的工作,尤其是在开发的时候用到同一个库的多张表,很快就可以完成数据库表->strcut的映射。 +### fuckdb CMD +If you don't want to use the web UI, you have a more fast way to generate struct - fuckdb cmd. +- 首先, 编辑 fuckdb.json 在`./fuckdb/cmd` 中,填写你的MySQL信息 +``` +{ + "db": { + "host": "localhost", + "port": 3306, + "password": "password", + "user": "root", + "table": "cars", + "database": "example", + "packageName": "test", + "structName": "test", + "jsonAnnotation": true, + "gormAnnotation": true + } +} +``` +- `go run fuckdb_cmd.gom` then copy your code and enjoy it. + +在 `./fuckdb/cmd` 下面可以找到对应操作系统的可执行文件 + + 欢迎试用&反馈&Contribute。代码地址:https://github.com/hantmac/fuckdb \ No newline at end of file