mirror of
https://github.com/beego/bee.git
synced 2024-11-24 18:30:53 +00:00
if tag.Comment is empty, the ORM tag string will not contain description
This commit is contained in:
parent
f5471680e4
commit
812b8c4e5b
@ -256,8 +256,11 @@ func (tag *OrmTag) String() string {
|
||||
if len(ormOptions) == 0 {
|
||||
return ""
|
||||
}
|
||||
if tag.Comment != "" {
|
||||
return fmt.Sprintf("`orm:\"%s\" description:\"%s\"`", strings.Join(ormOptions, ";"), tag.Comment)
|
||||
}
|
||||
return fmt.Sprintf("`orm:\"%s\"`", strings.Join(ormOptions, ";"))
|
||||
}
|
||||
|
||||
func GenerateAppcode(driver, connStr, level, tables, currpath string) {
|
||||
var mode byte
|
||||
|
Loading…
Reference in New Issue
Block a user