Skip to content

Commit

Permalink
fix: generate multiline comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Feb 24, 2022
1 parent 74522d7 commit 1e781ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/model/tbl_column.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ func (c *Column) ToField(nullable, coverable bool) *Field {
}

func (c *Column) multilineComment() bool {
if cm, ok := c.Comment(); ok {
strings.Contains(cm, "\n")
}
return false
cm, ok := c.Comment()
return ok && strings.Contains(cm, "\n")
}

func (c *Column) buildGormTag() string {
Expand Down

0 comments on commit 1e781ca

Please sign in to comment.