Skip to content

Commit

Permalink
fix(format): fix format map panic
Browse files Browse the repository at this point in the history
joyme123 committed Oct 18, 2024
1 parent d3da532 commit 5a9ca92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions format/field.go
Original file line number Diff line number Diff line change
@@ -101,6 +101,10 @@ func MustFormatField(field *parser.Field, space string, indent string, oneline b
}

func MustFormatFieldType(ft *parser.FieldType) string {
if ft == nil {
return ""
}

annos := ""
if ft.Annotations != nil {
annos = MustFormatAnnotations(ft.Annotations)

0 comments on commit 5a9ca92

Please sign in to comment.