Commit Graph

451 Commits (97bf3856c1bcea5380e00f01d6659130ada0d905)

Author SHA1 Message Date
fang duan 97bf3856c1
show help when running goctl rpc protoc without any flags (#1683) 3 years ago
fang duan ff6c6558dd
improve goctl rpc new (#1687) 3 years ago
Fyn ee88abce14
fix(goctl): api/new/api.tpl (#1788) 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
Fyn 6d9dfc08f9
feat(goctl): supports api multi-level importing (#1747)
* feat(goctl): supports api  multi-level importing

Resolves: #1744

* fix(goctl): import-cycle, etc.

import-cycle will not be allowed
e.g., a.api -> b.api -> a.api
regular multiple-import will be allowed
e.g., a.api -> b.api -> c.api
                   -> c.api

* refactor(goctl): adds comments to exported var

* fix(goctl): typo in a comment
3 years ago
anqiansong 252fabcc4b
fix nil pointer if group not exists (#1773)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan 415c4c91fc
fix: model unique keys generated differently in each re-generation (#1771) 3 years ago
fang duan 0cc9d4ff8d
show help when running goctl rpc template without any flags (#1685)
close #1684
3 years ago
anqiansong 8dd764679c
Fix #1765 (#1767)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan 9fe868ade9
chore: remove legacy code (#1766) 3 years ago
Kevin Wan ab01442d46
add more tests (#1763)
* feat: add goctl docker build scripts

* chore: add more tests
3 years ago
Kevin Wan 8694e38384
feat: add goctl docker build scripts (#1760) 3 years ago
Kevin Wan faad6e27e3
feat: use go:embed to embed templates (#1756) 3 years ago
anqiansong 58a0b17451
Support `goctl env install` (#1752)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan 89eccfdb97
chore: update go-zero to v1.3.2 in goctl (#1750) 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 83cacf51b7
chore: update goctl version to 1.3.4 (#1742) 3 years ago
Kevin Wan 6dccfa29fd
feat: let model customizable (#1738) 3 years ago
anqiansong 7e0b0ab0b1
Fix zrpc code generation error with --remote (#1739)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan ac18cc470d
chore: refactor to use const instead of var (#1731) 3 years ago
Fyn f4471846ff
feat(goctl): supports model code 'DO NOT EDIT' (#1728)
Resolves: #1710
3 years ago
anqiansong 9c2d526a11
Fix unit test (#1730)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan 2b9fc26c38
refactor: guard timeout on API files (#1726) 3 years ago
Xiaoju Jiang 321dc2d410
Added support for setting the parameter size accepted by the interface and custom timeout and maxbytes in API file (#1713)
* Added support for setting the parameter size accepted by the interface

* support custom timeout and maxbytes in API file

* support timeout used unit

* remove goctl maxBytes
3 years ago
Fyn 500bd87c85
fix(goctl): api format with reader input (#1722)
resolves #1721
3 years ago
Kevin Wan 3febb1a5d0
chore: refactor code (#1700) 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
anqiansong 0aeb49a6b0
Add verbose flag (#1696)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
anqiansong 5c169f4f49
Remove debug log (#1669)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan d29dfa12e3
feat: support -base to specify base image for goctl docker (#1668)
* feat: support -base to specify base image for goctl docker

* chore: update usage
3 years ago
anqiansong 194f55e08e
Remove unused code (#1667)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan c0f9892fe3
feat: add Dockerfile for goctl (#1666) 3 years ago
anqiansong 227104d7d7
feat: Remove command `goctl rpc proto` (#1665)
* Fix goctl completion expression

* Fix code generation error if the pkg of pb/grpc is same to zrpc call client pkg

* Remove deprecated comment on action goctl rpc new

* Remove zrpc code generation on action goctl rpc proto

* Remove zrpc code generation on action goctl rpc proto

* Remove Generator interface

Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
anqiansong 448029aa4b
Mkdir if not exists (#1659)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Fyn 17e0afeac0
fix(goctl): model method FindOneCtx should be FindOne (#1656) 3 years ago
ronething-bot 18916b5189
[fix] typo (#1655) 3 years ago
Kevin Wan c11a09be23
chore: remove unnecessary env (#1654) 3 years ago
ronething-bot 56e1ecf2f3
fix: typo (#1646) 3 years ago
xybingbing 09e6d94f9e
FindOneBy 漏 Context (#1642) 3 years ago
anqiansong cc9d16f505
fix: Update unix-like path regex (#1637)
* Revert import value regex

* Update linux path regex

Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
chensy c55694d957
Support for referencing types in different API files using format (#1630) 3 years ago
Ziyi Zhang 209ffb934b
fix(goctl): kotlin code generation (#1632)
Signed-off-by: Ziyi Zhang <soasurs@gmail.com>
3 years ago
Kevin Wan 26a33932cd
feat: support scratch as the base docker image (#1634) 3 years ago
Kevin Wan d6a692971f
chore: reduce the docker image size (#1633)
* chore: reduce the docker image size

* chore: format dockerfile
3 years ago
anqiansong 4624390e54
Fix #1585 #1547 (#1624) 3 years ago
Kevin Wan 63b7d292c1
chore: update goctl version to 1.3.3, change docker build temp dir (#1621) 3 years ago
Fyn 365c569d7c
fix(goctl): dart gen user defined struct array (#1620) 3 years ago
anqiansong 68a81fea8a
Fix #1609 (#1617) 3 years ago
anqiansong 08a8bd7ef7
Fix #1614 (#1616) 3 years ago
Kevin Wan 3b7ca86e4f
chore: add unit tests (#1615)
* test: add more tests

* test: add more tests
3 years ago