Commit Graph

88 Commits (cc2a7e97f9d6abee217e437bd17fe6400adacc0a)

Author SHA1 Message Date
kesonan 7ba8adfc74
fix(goctl)/new parser (#3834)
Co-authored-by: keson <keson@kesondeMacBook-Pro.local>
11 months ago
kesonan d84dfe1b20
fix: goctl unit test (#3636) 1 year ago
guangwu 63368d8b0c
io/ioutil deprecated (#3217) 2 years ago
Kevin Wan f77e2c9cfa
chore: add more tests (#3014) 2 years ago
Kevin Wan eab904af64
chore: update goctl interface{} to any (#2819)
* chore: update goctl interface{} to any

* chore: update goctl interface{} to any
2 years ago
Kevin Wan ae87114282
chore: change interface{} to any (#2818)
* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
2 years ago
chowyu12 ce1c02f4f9
Feat: ignorecolums add sort (#2648)
* add go-grpc_opt and go_opt for grpc new command

* feat: remove log when disable log

* feat: add sort

Co-authored-by: zhouyy <zhouyy@ickey.cn>
2 years ago
anqiansong 9504d30049
fix(goctl): fix redundant import (#2551) 2 years ago
chen quan 4f6a900fd4
fix(goctl): fix the unit test bug of goctl (#2458) 2 years ago
jesse.tang 1b344a8851
cleanup: deprecated field and func (#2416)
* cleanup: deprecated field and func

* fmt import order
2 years ago
anqiansong 2cde970c9e
feat(goctl):Add ignore-columns flag (#2407)
* fix #2074,#2100

* format code

* fix #2397

* format code

* Support comma spliter

* format code
2 years ago
Kevin Wan d935c83a54
feat: support baggage propagation in httpc (#2375)
* feat: support baggage propagation in httpc

* chore: use go 1.16

* chore: use go 1.16

* chore: use go ^1.16

* chore: remove deprecated
2 years ago
anqiansong f70805ee60
Add strict flag (#2248)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2 years ago
yiGmMk fb6d7e2fd2
fix #2301,package conflict generated by ddl (#2307)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2 years ago
Richard Yi 6e50c87dca
fix: generated sql query fields do not match template (#2004)
* Fix typo

* Match generated sql query fields with template
2 years ago
Kevin Wan 1c09db6d5d
chore: coding style (#2120) 2 years ago
anqiansong 58787746db
fix: Useless delete cache logic in update (#1923)
* Fix bug: useless delete cache logic in update

* Format code
3 years ago
anqiansong f486685e99
Fix code generation (#1897) 3 years ago
anqiansong 5383e29ce6
feat: Replace cli to cobra (#1855)
* Replace cli

* Replace cli

* Replace cli

* Format code

* Add compare case

* Add compare case

* Add compare case

* Support go style flag

* Support go style flag

* Add test case
3 years ago
anqiansong 16c61c6657
chore: Embed unit test data (#1812)
* Embed unit test data

* Add testdata

Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
方航 fabea4c448
fix bug: crash when generate model with goctl. (#1777)
* fix bug: crash when generate model with goctl.

situation: column name with line.

CREATE TABLE test (
id int NOT NULL AUTO_INCREMENT,
zh-cn text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '中文简体',
PRIMARY KEY (id) USING BTREE,
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

* group imports

group imports

* Use

go-zero/tools/goctl/util/string.go
 func SafeString(in string) string {
instead of ReplaceAll

Co-authored-by: 方航 <fanghang@tange.ai>
3 years ago
Kevin Wan 415c4c91fc
fix: model unique keys generated differently in each re-generation (#1771) 3 years ago
anqiansong 8dd764679c
Fix #1765 (#1767)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan dfd58c213c
fix: model generation bug on with cache (#1743)
* fix: model generation bug on with cache

* chore: refine template

* chore: fix test failure
3 years ago
Kevin Wan 6dccfa29fd
feat: let model customizable (#1738) 3 years ago
Fyn f4471846ff
feat(goctl): supports model code 'DO NOT EDIT' (#1728)
Resolves: #1710
3 years ago
Mikael d8054d8def
fix -cache=true insert no clean cache (#1672)
* fix -cache=true insert no clean cache

* fix -cache=true insert no clean cache
3 years ago
Kevin Wan e31128650e
Revert "🐞 fix(gen): pg gen of insert (#1591)" (#1598)
This reverts commit cc4c4928e0.
3 years ago
toutou_o cc4c4928e0
🐞 fix(gen): pg gen of insert (#1591)
Co-authored-by: kurimi1 <d0n41df@gmail.com>
3 years ago
Kevin Wan a40254156f
refactor: refactor yaml unmarshaler (#1517) 3 years ago
Kevin Wan 4b7a680ac5
refactor: rename from tal-tech to zeromicro for goctl (#1481) 3 years ago
anqiansong e57fa8ff53
Fix/issue#1447 (#1458)
* Add data for template to render

* fix #1447

Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
anqiansong 89ce5e492b
refactor file|path (#1409)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
行者 f5f2097d14
Updated MySQL生成表结构体遇到关键字db部分保持原字段名定义 (#1369) 3 years ago
anqiansong 9c48e9ceab
Feature add template version (#1152) 3 years ago
Kevin Wan 65905b914d
ci: add reviewdog (#1096) 3 years ago
Kevin Wan 2e12cd2c99
coding style (#1083) 3 years ago
anqiansong 9a724fe907
Add MustTempDir (#1069) 3 years ago
toven tang d179b342b2
修复使用 postgres 数据库时,位置参数重复,导致参数与值不对应的问题。 (#960)
* 修复使用 postgres 数据库时,位置参数重复,导致参数与值不对应的问题。

* 修复使用 postgres 数据库时,位置参数重复,导致参数与值不对应的问题。

Co-authored-by: toven <toven@advan.onaliyun.com>
3 years ago
chenquan b71ac2042a
Add a test case for database code generation `tool` (#961) 3 years ago
anqiansong b2fea65faa
Optimize model naming (#910)
* add unit test

* fix #907

* format code

* format code

* format code

Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
3 years ago
anqiansong a1fe8bf6cd
fix missing `updateMethodTemplateFile` (#924) 3 years ago
Kevin Wan 02adcccbf4
format code (#884) 3 years ago
anqiansong 089cdaa75f
Feature model postgresql (#842)
* Support postgresql generate

* Update template Var

* Support to generate postgresql model

* Support to generate postgresql model

* Update template

Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
3 years ago
fangjianwei 476026e393
Added database prefix of cache key. (#835) 3 years ago
Kevin Wan e47079f0f4
go format with extra rules (#821) 3 years ago
anqiansong 9b2a279948
Fix issues: #725, #740 (#813)
* Fix issues: #725, #740

* Update filed sort

Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
3 years ago
anqiansong 453f949638
replace cache key with colon (#746)
Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
4 years ago
Bo-Yi Wu 73906f996d
chore(format): change by gofumpt tool (#697)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
4 years ago
Bo-Yi Wu afd9ff889e
chore: update code format. (#628) 4 years ago