Cleanup and housekeeping: remove unused code and fix linter warnings #3
reviewdog [golangci-serializer] report
reported by reviewdog 🐶
Findings (25)
serializer/serix/decode.go|27 col 3| type assertion must be checked (forcetypeassert)
serializer/serix/decode.go|105 col 23| type assertion must be checked (forcetypeassert)
serializer/serix/decode.go|162 col 4| type assertion must be checked (forcetypeassert)
serializer/serix/decode.go|174 col 19| type assertion must be checked (forcetypeassert)
serializer/serix/decode.go|229 col 19| type assertion must be checked (forcetypeassert)
serializer/serix/decode.go|361 col 4| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|20 col 3| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|105 col 5| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|163 col 62| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|165 col 58| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|167 col 62| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|169 col 58| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|264 col 2| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|283 col 3| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|308 col 13| type assertion must be checked (forcetypeassert)
serializer/serix/map_decode.go|388 col 3| type assertion must be checked (forcetypeassert)
serializer/serix/map_encode.go|213 col 22| type assertion must be checked (forcetypeassert)
serializer/serix/map_encode.go|214 col 27| type assertion must be checked (forcetypeassert)
serializer/serix/map_encode.go|283 col 9| type assertion must be checked (forcetypeassert)
serializer/serix/serix.go|409 col 9| type assertion must be checked (forcetypeassert)
serializer/serix/serix.go|762 col 3| type assertion must be checked (forcetypeassert)
serializer/serix/serix.go|765 col 3| type assertion must be checked (forcetypeassert)
serializer/serix/decode.go|41 col 4| return with no blank line before (nlreturn)
serializer/serix/decode.go|143 col 3| return with no blank line before (nlreturn)
serializer/serix/map_decode.go|123 col 3| return with no blank line before (nlreturn)
Filtered Findings (0)
Annotations
Check failure on line 27 in serializer/serix/decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/decode.go#L27
type assertion must be checked (forcetypeassert)
Raw output
serix/decode.go:27:3: type assertion must be checked (forcetypeassert)
deserializable = value.Interface().(Deserializable)
^
Check failure on line 105 in serializer/serix/decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/decode.go#L105
type assertion must be checked (forcetypeassert)
Raw output
serix/decode.go:105:23: type assertion must be checked (forcetypeassert)
deseri.ReadUint256(addrValue.Interface().(**big.Int), func(err error) error {
^
Check failure on line 162 in serializer/serix/decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/decode.go#L162
type assertion must be checked (forcetypeassert)
Raw output
serix/decode.go:162:4: type assertion must be checked (forcetypeassert)
addrValue.Interface().(*string),
^
Check failure on line 174 in serializer/serix/decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/decode.go#L174
type assertion must be checked (forcetypeassert)
Raw output
serix/decode.go:174:19: type assertion must be checked (forcetypeassert)
deseri.ReadBool(addrValue.Interface().(*bool), func(err error) error {
^
Check failure on line 229 in serializer/serix/decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/decode.go#L229
type assertion must be checked (forcetypeassert)
Raw output
serix/decode.go:229:19: type assertion must be checked (forcetypeassert)
deseri.ReadTime(addrValue.Interface().(*time.Time), func(err error) error {
^
Check failure on line 361 in serializer/serix/decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/decode.go#L361
type assertion must be checked (forcetypeassert)
Raw output
serix/decode.go:361:4: type assertion must be checked (forcetypeassert)
addrValue.Interface().(*[]byte),
^
Check failure on line 20 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L20
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:20:3: type assertion must be checked (forcetypeassert)
deserializable = value.Interface().(DeserializableJSON)
^
Check failure on line 105 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L105
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:105:5: type assertion must be checked (forcetypeassert)
fieldValStr := mapVal.(map[string]any)[mapKey].(string)
^
Check failure on line 163 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L163
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:163:62: type assertion must be checked (forcetypeassert)
return api.mapDecodeNum(value, valueType, float64NumParser(mapVal.(float64), value.Kind(), true))
^
Check failure on line 165 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L165
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:165:58: type assertion must be checked (forcetypeassert)
return api.mapDecodeNum(value, valueType, strNumParser(mapVal.(string), 64, true))
^
Check failure on line 167 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L167
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:167:62: type assertion must be checked (forcetypeassert)
return api.mapDecodeNum(value, valueType, float64NumParser(mapVal.(float64), value.Kind(), false))
^
Check failure on line 169 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L169
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:169:58: type assertion must be checked (forcetypeassert)
return api.mapDecodeNum(value, valueType, strNumParser(mapVal.(string), 64, false))
^
Check failure on line 264 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L264
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:264:2: type assertion must be checked (forcetypeassert)
objectCode := uint32(objectCodeAny.(float64))
^
Check failure on line 283 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L283
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:283:3: type assertion must be checked (forcetypeassert)
strVal := mapVal.(string)
^
Check failure on line 308 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L308
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:308:13: type assertion must be checked (forcetypeassert)
if uint32(mapObjectCode.(float64)) != objectCode {
^
Check failure on line 388 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L388
type assertion must be checked (forcetypeassert)
Raw output
serix/map_decode.go:388:3: type assertion must be checked (forcetypeassert)
fieldValStr := mapVal.(string)
^
Check failure on line 213 in serializer/serix/map_encode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_encode.go#L213
type assertion must be checked (forcetypeassert)
Raw output
serix/map_encode.go:213:22: type assertion must be checked (forcetypeassert)
for _, k := range eleOut.(*orderedmap.OrderedMap).Keys() {
^
Check failure on line 214 in serializer/serix/map_encode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_encode.go#L214
type assertion must be checked (forcetypeassert)
Raw output
serix/map_encode.go:214:27: type assertion must be checked (forcetypeassert)
obj.Set(k, lo.Return1(eleOut.(*orderedmap.OrderedMap).Get(k)))
^
Check failure on line 283 in serializer/serix/map_encode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_encode.go#L283
type assertion must be checked (forcetypeassert)
Raw output
serix/map_encode.go:283:9: type assertion must be checked (forcetypeassert)
return k.(string), v, nil
^
Check failure on line 409 in serializer/serix/serix.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/serix.go#L409
type assertion must be checked (forcetypeassert)
Raw output
serix/serix.go:409:9: type assertion must be checked (forcetypeassert)
return m.(*orderedmap.OrderedMap), nil
^
Check failure on line 762 in serializer/serix/serix.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/serix.go#L762
type assertion must be checked (forcetypeassert)
Raw output
serix/serix.go:762:3: type assertion must be checked (forcetypeassert)
code = objectType.(uint32)
^
Check failure on line 765 in serializer/serix/serix.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/serix.go#L765
type assertion must be checked (forcetypeassert)
Raw output
serix/serix.go:765:3: type assertion must be checked (forcetypeassert)
code = uint32(objectType.(uint8))
^
Check failure on line 41 in serializer/serix/decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/decode.go#L41
return with no blank line before (nlreturn)
Raw output
serix/decode.go:41:4: return with no blank line before (nlreturn)
return api.decode(ctx, b, valueElem, ts, opts)
^
Check failure on line 143 in serializer/serix/decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/decode.go#L143
return with no blank line before (nlreturn)
Raw output
serix/decode.go:143:3: return with no blank line before (nlreturn)
return api.decodeStruct(ctx, b, value, valueType, ts, opts)
^
Check failure on line 123 in serializer/serix/map_decode.go
github-actions / golangci-serializer
[golangci-serializer] serializer/serix/map_decode.go#L123
return with no blank line before (nlreturn)
Raw output
serix/map_decode.go:123:3: return with no blank line before (nlreturn)
return api.mapDecodeStruct(ctx, mapVal, value, valueType, ts, opts)
^