Commit Graph

17 Commits (04ed821b65cd00ec12b4390f5288a90be8a94634)

Author SHA1 Message Date
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
方航 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 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 d894b88c3e
feature 1.1.5 (#411) 4 years ago
Kevin Wan eca4ed2cc0
format code (#386) 4 years ago
Keson 24fb29a356
patch model&rpc (#207)
* change column to read from information_schema

* reactor generate mode from datasource

* reactor generate mode from datasource

* add primary key check logic

* resolve rebase conflicts

* add naming style

* add filename test case

* resolve rebase conflicts

* reactor test

* add test case

* change shell script to makefile

* update rpc new

* update gen_test.go

* format code

* format code

* update test

* generates alias
4 years ago
Keson 41964f9d52
gozero template (#147)
* model/rpc generate code from template cache

* delete unused(deprecated) code

* support template init|update|clean|revert

* model: return the execute result for insert and update operation

* // deprecated: containsAny

* add template test

* add default buildVersion

* update build version
4 years ago
kevin dfe6e88529 use goctl template to generate all kinds of templates 4 years ago
kevin f904710811 support api templates 4 years ago
Keson db16115037
rpc service generation (#26)
* add execute files

* add protoc-osx

* add rpc generation

* add rpc generation

* add: rpc template generation

* update usage

* fixed env prepare for project in go path

* optimize gomod cache

* add README.md

* format error

* reactor templatex.go

* remove waste code
4 years ago
Keson db83843558
gocctl model v20200819 (#18)
* rename snake、came method

* new: generate model from data source

* add change log md

* update model doc

* update  doc

* beauty code
4 years ago
Keson d21d770b5b
goctl model reactor (#15)
* reactor sql generation

* reactor sql generation

* add console & example

* optimize unit test & add document

* modify default config

* remove test file

* Revert "remove test file"

This reverts commit 81041f9e

* fix stringx.go & optimize example

* remove unused code
4 years ago
kevin 0a7e0cce77 update package reference 4 years ago
kim 121323b8c3 goctl added 4 years ago