Skip to content

Commit

Permalink
fixbug
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfzf committed Jul 29, 2022
1 parent 074141b commit 081001b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (tab Tab) genAdd(buf *bytes.Buffer, s *SchemaApi) {
validate = " validate:\"min=2\""
}
}
tag := fmt.Sprintf("`form:\"%s\" %s`", field.Name, validate)
tag := fmt.Sprintf("`form:\"%s\"%s`", field.Name, validate)
if field.Comment != "" {
comment = "// " + field.Comment
}
Expand Down Expand Up @@ -333,7 +333,7 @@ func (tab Tab) genUpdate(buf *bytes.Buffer, s *SchemaApi) {
validate = " validate:\"min=2\""
}
}
tag := fmt.Sprintf("`form:\"%s,optional\" %s`", field.Name, validate)
tag := fmt.Sprintf("`form:\"%s,optional\"%s`", field.Name, validate)
if field.Comment != "" {
comment = "// " + field.Comment
}
Expand Down

0 comments on commit 081001b

Please sign in to comment.