Skip to content

Commit

Permalink
Merge pull request #40 from joyme123/fix-format-panic
Browse files Browse the repository at this point in the history
fix(format): fix format map panic
  • Loading branch information
joyme123 authored Oct 18, 2024
2 parents d3da532 + 5a9ca92 commit cbe1341
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
Expand Up @@ -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)
Expand Down

0 comments on commit cbe1341

Please sign in to comment.