forked from Mirrors/jsonapi
Addressing warnings.
This commit is contained in:
parent
cf9619af15
commit
d94776e6cc
|
@ -190,10 +190,13 @@ func TestEmbeddedUnmarshalOrder(t *testing.T) {
|
||||||
|
|
||||||
// marshal f (Foo) using json marshaler
|
// marshal f (Foo) using json marshaler
|
||||||
jsonData, err := json.Marshal(f)
|
jsonData, err := json.Marshal(f)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
// convert bytes to map[string]interface{} so that we can do a semantic JSON comparison
|
// convert bytes to map[string]interface{} so that we can do a semantic JSON comparison
|
||||||
var jsonAPIVal, jsonVal map[string]interface{}
|
var jsonAPIVal, jsonVal map[string]interface{}
|
||||||
if err := json.Unmarshal(jsonAPIData.Bytes(), &jsonAPIVal); err != nil {
|
if err = json.Unmarshal(jsonAPIData.Bytes(), &jsonAPIVal); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if err = json.Unmarshal(jsonData, &jsonVal); err != nil {
|
if err = json.Unmarshal(jsonData, &jsonVal); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue