Skip to content

Commit 85b0784

Browse files
committed
basic,types: fix lint suggestions
1 parent ccfede8 commit 85b0784

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

basic_gojay.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,7 @@ func (v ChangeAnnotationsMap) IsNil() bool { return v == nil }
837837
// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject.
838838
func (v ChangeAnnotationsMap) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
839839
edits := ChangeAnnotation{}
840-
err := dec.Object(&edits)
841-
if err != nil {
840+
if err := dec.Object(&edits); err != nil {
842841
return err
843842
}
844843
v[ChangeAnnotationIdentifier(k)] = edits

types_gojay.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ func (m StringInterfaceMap) IsNil() bool {
120120
// UnmarshalJSONObject implements gojay.UnmarshalerJSONObject.
121121
func (m StringInterfaceMap) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
122122
var iface interface{}
123-
err := dec.Interface(&iface)
124-
if err != nil {
123+
if err := dec.Interface(&iface); err != nil {
125124
return err
126125
}
127126
m[k] = iface
@@ -157,8 +156,7 @@ func (m StringStringMap) IsNil() bool {
157156
// UnmarshalJSONObject implements gojay.UnmarshalerJSONObject.
158157
func (m StringStringMap) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
159158
s := ""
160-
err := dec.String(&s)
161-
if err != nil {
159+
if err := dec.String(&s); err != nil {
162160
return err
163161
}
164162
m[k] = s

0 commit comments

Comments
 (0)