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
_, _=json.Marshal(mapMarshalTextString) // want "Error return value of `encoding/json.Marshal` is not checked: unsafe type `nosafe.marshalText` as map key found"
507
521
_, err=json.Marshal(mapMarshalTextString) // err is checked
508
522
_=err
523
+
524
+
varmjmarshalJSON
525
+
_, _=json.Marshal(mj) // want "Error return value of `encoding/json.Marshal` is not checked: unsafe type `nosafe.marshalJSON` found"
526
+
_, err=json.Marshal(mj) // err is checked
527
+
_=err
528
+
529
+
varmapMarshalJSONStringmap[marshalJSON]string
530
+
_, _=json.Marshal(mapMarshalJSONString) // want "Error return value of `encoding/json.Marshal` is not checked: unsafe type `nosafe.marshalJSON` as map key found"
531
+
_, err=json.Marshal(mapMarshalJSONString) // err is checked
532
+
_=err
509
533
}
510
534
511
535
// JSONMarshalInvalidTypes contains a multitude of test cases to marshal different combinations of types to JSON,
_, _=json.Marshal(mapMarshalTextString) // want "Error return value of `encoding/json.Marshal` is not checked: unsafe type `standard.marshalText` as map key found"
507
521
_, err=json.Marshal(mapMarshalTextString) // err is checked
508
522
_=err
523
+
524
+
varmjmarshalJSON
525
+
_, _=json.Marshal(mj) // want "Error return value of `encoding/json.Marshal` is not checked: unsafe type `standard.marshalJSON` found"
526
+
_, err=json.Marshal(mj) // err is checked
527
+
_=err
528
+
529
+
varmapMarshalJSONStringmap[marshalJSON]string
530
+
_, _=json.Marshal(mapMarshalJSONString) // want "Error return value of `encoding/json.Marshal` is not checked: unsafe type `standard.marshalJSON` as map key found"
531
+
_, err=json.Marshal(mapMarshalJSONString) // err is checked
532
+
_=err
509
533
}
510
534
511
535
// JSONMarshalInvalidTypes contains a multitude of test cases to marshal different combinations of types to JSON,
0 commit comments