Addressing warnings.

This commit is contained in:
Aren Patel 2017-08-01 17:44:50 -07:00
parent cf9619af15
commit d94776e6cc
No known key found for this signature in database
GPG Key ID: 90489CDA50BCDE34
1 changed files with 4 additions and 1 deletions

View File

@ -190,10 +190,13 @@ func TestEmbeddedUnmarshalOrder(t *testing.T) {
// marshal f (Foo) using json marshaler
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
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)
}
if err = json.Unmarshal(jsonData, &jsonVal); err != nil {