Skip to content

Commit b2295f9

Browse files
committed
imp
1 parent 29ee98a commit b2295f9

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

msgpack_test.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,10 +1776,10 @@ func testEmbeddedStruct(t *testing.T) {
17761776
})
17771777
}
17781778

1779-
// Compare with json encoding
1779+
// Compare with JSON
17801780
jsonBytes, _ := json.Marshal(original)
17811781
var jsonDecoded Parent
1782-
json.Unmarshal(jsonBytes, &jsonDecoded)
1782+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
17831783

17841784
if msgDecoded.EmbeddedField != jsonDecoded.EmbeddedField ||
17851785
msgDecoded.Name != jsonDecoded.Name ||
@@ -1826,10 +1826,10 @@ func testEmbeddedStruct(t *testing.T) {
18261826
})
18271827
}
18281828

1829-
// Compare with json
1829+
// Compare with JSON
18301830
jsonBytes, _ := json.Marshal(original)
18311831
var jsonDecoded Parent
1832-
json.Unmarshal(jsonBytes, &jsonDecoded)
1832+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
18331833

18341834
if msgDecoded.Embedded.Field != jsonDecoded.Embedded.Field ||
18351835
msgDecoded.Regular != jsonDecoded.Regular {
@@ -1882,10 +1882,10 @@ func testEmbeddedStruct(t *testing.T) {
18821882
})
18831883
}
18841884

1885-
// Compare with json
1885+
// Compare with JSON
18861886
jsonBytes, _ := json.Marshal(original)
18871887
var jsonDecoded Top
1888-
json.Unmarshal(jsonBytes, &jsonDecoded)
1888+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
18891889

18901890
if msgDecoded.DeepField != jsonDecoded.DeepField ||
18911891
msgDecoded.MiddleField != jsonDecoded.MiddleField ||
@@ -1933,10 +1933,10 @@ func testEmbeddedStruct(t *testing.T) {
19331933
})
19341934
}
19351935

1936-
// Compare with json
1936+
// Compare with JSON
19371937
jsonBytes, _ := json.Marshal(original)
19381938
var jsonDecoded Derived
1939-
json.Unmarshal(jsonBytes, &jsonDecoded)
1939+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
19401940

19411941
if msgDecoded.Name != jsonDecoded.Name || msgDecoded.Age != jsonDecoded.Age {
19421942
t.Errorf("msgpack and json results differ:\nmsgpack: %+v\njson: %+v",
@@ -1986,10 +1986,10 @@ func testEmbeddedStruct(t *testing.T) {
19861986
})
19871987
}
19881988

1989-
// Compare with json
1989+
// Compare with JSON
19901990
jsonBytes, _ := json.Marshal(original)
19911991
var jsonMap map[string]interface{}
1992-
json.Unmarshal(jsonBytes, &jsonMap)
1992+
_ = json.Unmarshal(jsonBytes, &jsonMap)
19931993

19941994
if len(msgDecoded) != len(jsonMap) {
19951995
t.Errorf("Field count differs: msgpack=%d, json=%d", len(msgDecoded), len(jsonMap))
@@ -2035,10 +2035,10 @@ func testEmbeddedStruct(t *testing.T) {
20352035
})
20362036
}
20372037

2038-
// Compare with json
2038+
// Compare with JSON
20392039
jsonBytes, _ := json.Marshal(original)
20402040
var jsonDecoded Derived
2041-
json.Unmarshal(jsonBytes, &jsonDecoded)
2041+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
20422042

20432043
if msgDecoded.Value != jsonDecoded.Value || msgDecoded.Extra != jsonDecoded.Extra {
20442044
t.Errorf("msgpack and json results differ:\nmsgpack: %+v\njson: %+v",
@@ -2083,10 +2083,10 @@ func testEmbeddedStruct(t *testing.T) {
20832083
})
20842084
}
20852085

2086-
// Compare with json
2086+
// Compare with JSON
20872087
jsonBytes, _ := json.Marshal(original)
20882088
var jsonDecoded Outer
2089-
json.Unmarshal(jsonBytes, &jsonDecoded)
2089+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
20902090

20912091
if msgDecoded.Inner.Value != jsonDecoded.Inner.Value ||
20922092
msgDecoded.Other != jsonDecoded.Other {
@@ -2142,10 +2142,10 @@ func testEmbeddedStruct(t *testing.T) {
21422142
})
21432143
}
21442144

2145-
// Compare with json
2145+
// Compare with JSON
21462146
jsonBytes, _ := json.Marshal(original)
21472147
var jsonDecoded Document
2148-
json.Unmarshal(jsonBytes, &jsonDecoded)
2148+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
21492149

21502150
if msgDecoded.CreatedAt != jsonDecoded.CreatedAt ||
21512151
msgDecoded.UpdatedAt != jsonDecoded.UpdatedAt ||
@@ -2196,10 +2196,10 @@ func testEmbeddedStruct(t *testing.T) {
21962196
})
21972197
}
21982198

2199-
// Compare with json
2199+
// Compare with JSON
22002200
jsonBytes, _ := json.Marshal(original)
22012201
var jsonDecoded Derived
2202-
json.Unmarshal(jsonBytes, &jsonDecoded)
2202+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
22032203

22042204
if msgDecoded.Public != jsonDecoded.Public || msgDecoded.Extra != jsonDecoded.Extra {
22052205
t.Errorf("msgpack and json results differ:\nmsgpack: %+v\njson: %+v",
@@ -2260,10 +2260,10 @@ func testEmbeddedStruct(t *testing.T) {
22602260
})
22612261
}
22622262

2263-
// Compare with json
2263+
// Compare with JSON
22642264
jsonBytes, _ := json.Marshal(original)
22652265
var jsonDecoded D
2266-
json.Unmarshal(jsonBytes, &jsonDecoded)
2266+
_ = json.Unmarshal(jsonBytes, &jsonDecoded)
22672267

22682268
if msgDecoded.FieldA != jsonDecoded.FieldA ||
22692269
msgDecoded.FieldB != jsonDecoded.FieldB ||

0 commit comments

Comments
 (0)