Skip to content

Commit f5dd31c

Browse files
sivchariJoelSpeed
authored andcommitted
add new test case for ignroed
Signed-off-by: sivchari <shibuuuu5@gmail.com>
1 parent 61db398 commit f5dd31c

File tree

1 file changed

+6
-1
lines changed
  • pkg/analysis/jsontags/testdata/src/a

1 file changed

+6
-1
lines changed

pkg/analysis/jsontags/testdata/src/a/a.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ type JSONTagTestStruct struct {
1818
JSONTagWithID string `json:"jsonTagWithID"`
1919
JSONTagWithTTL string `json:"jsonTagWithTTL"`
2020
JSONTagWithGiB string `json:"jsonTagWithGiB"`
21-
IgnoreTag string `json:"-"`
21+
Ignored string `json:"-"`
22+
23+
IgnoredAnonymousStruct struct {
24+
// This field should be ignored since the parent field is ignored.
25+
A string `json:""`
26+
} `json:"-"`
2227

2328
A `json:",inline"`
2429
B `json:"bar,omitempty"`

0 commit comments

Comments
 (0)