mirror of
https://github.com/zhufuyi/sponge.git
synced 2025-10-04 00:16:25 +08:00
feat: add rpc gate way command
This commit is contained in:
@@ -176,11 +176,20 @@ func (t tmplField) GoTypeZero() string {
|
||||
return t.GoType
|
||||
}
|
||||
|
||||
// AddOne 加一
|
||||
// AddOne counter
|
||||
func (t tmplField) AddOne(i int) int {
|
||||
return i + 1
|
||||
}
|
||||
|
||||
// AddOneWithTag counter and add id tag
|
||||
func (t tmplField) AddOneWithTag(i int) string {
|
||||
if t.ColName == "id" {
|
||||
return fmt.Sprintf(`%d [(tagger.tags) = "uri:\"id\"" ]`, i+1)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%d", i+1)
|
||||
}
|
||||
|
||||
const (
|
||||
__mysqlModel__ = "__mysqlModel__" //nolint
|
||||
__type__ = "__type__" //nolint
|
||||
|
Reference in New Issue
Block a user