Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hantmac committed Mar 31, 2020
1 parent 664bcdd commit 9d45d39
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 24 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9d45d39

Please sign in to comment.