Skip to content

Commit dd0d397

Browse files
authored
Merge pull request #73 from go-generalize/feat/ignore_option/main
fix: more ignore option
2 parents f9693f2 + db89df8 commit dd0d397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

struct.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (p *pkgParser) parseStruct(strct *types.Struct) tstypes.Type {
9292
}
9393
optional := len(jsonTag) >= 2 && jsonTag[1] == jsonTagOmitempty
9494

95-
if field == "-" {
95+
if field == "-" && !p.IgnoreOmittedJSONField {
9696
continue
9797
}
9898

0 commit comments

Comments
 (0)