Skip to content

Commit ff7e002

Browse files
author
piexlMax(奇淼
committed
fix: 修复richtext的情况下gorm标签多一个"的bug
1 parent a1c8f6b commit ff7e002

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/utils/autocode/template_funcs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func GenerateField(field systemReq.AutoCodeField) string {
7070
result = fmt.Sprintf(`%s datatypes.JSON `+"`"+`%s swaggertype:"array,object"`+"`"+``,
7171
field.FieldName, tagContent)
7272
case "richtext":
73-
tagContent := fmt.Sprintf(`json:"%s" form:"%s" gorm:"%s"`,
73+
tagContent := fmt.Sprintf(`json:"%s" form:"%s" gorm:"%s`,
7474
field.FieldJson, field.FieldJson, gormTag)
7575

7676
result = fmt.Sprintf(`%s *string `+"`"+`%stype:text;"`+"`"+``,

0 commit comments

Comments
 (0)