From d94776e6ccbfcdd924f72ab19e9f53e0660c5ca3 Mon Sep 17 00:00:00 2001 From: Aren Patel Date: Tue, 1 Aug 2017 17:44:50 -0700 Subject: [PATCH] Addressing warnings. --- embeded_structs_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/embeded_structs_test.go b/embeded_structs_test.go index b9c29c0..171cd60 100644 --- a/embeded_structs_test.go +++ b/embeded_structs_test.go @@ -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 {