Generate the TableName() methods for table_prefix is not empty #11
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "(deleted):dev/azhai"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
需要在模板中传递来自配置文件的Target参数。
TODO:
加入字段的json标注(DONE)WIP: Generate the TableName() methods for table_prefix is not emptyto Generate the TableName() methods for table_prefix is not empty@ -50,2 +52,4 @@
{{end}}
}
{{if ne $table_prefix ""}}
We could use
names.NewPrefixMapper
, so the changes are unnecessary.@ -327,0 +324,4 @@
func WriteCodeFile(fileName string, sourceCode []byte) ([]byte, error) {
var err error
// Formart/Prettify the code 格式化代码
if sourceCode, err = format.Source(sourceCode); err != nil {
The
format
is only for golang?Could you add some tests?
We should have options to generate
json
tag or not.Pull request closed