You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testdata/musttag.go
+1-3
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,11 @@ import (
8
8
9
9
// builtin functions:
10
10
funcmusttagJSON() {
11
-
varuserstruct { // want `exported fields should be annotated with the "json" tag`
11
+
varuserstruct { // want "`anonymous struct` should be annotated with the `json` tag as it is passed to `json.Marshal` at test/testdata/musttag.go:15:2"
Copy file name to clipboardExpand all lines: test/testdata/musttag_custom.go
+2-4
Original file line number
Diff line number
Diff line change
@@ -9,20 +9,18 @@ import (
9
9
10
10
// builtin functions:
11
11
funcmusttagJSONCustom() {
12
-
varuserstruct { // want `exported fields should be annotated with the "json" tag`
12
+
varuserstruct { // want "`anonymous struct` should be annotated with the `json` tag as it is passed to `json.Marshal` at test/testdata/musttag_custom.go:16:2"
13
13
Namestring
14
14
Emailstring`json:"email"`
15
15
}
16
16
json.Marshal(user)
17
-
json.Unmarshal(nil, &user)
18
17
}
19
18
20
19
// custom functions from config:
21
20
funcmusttagASN1Custom() {
22
-
varuserstruct { // want `exported fields should be annotated with the "asn1" tag`
21
+
varuserstruct { // want "`anonymous struct` should be annotated with the `asn1` tag as it is passed to `asn1.Marshal` at test/testdata/musttag_custom.go:25:2"
0 commit comments