summaryrefslogtreecommitdiff
path: root/decode.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@datawire.io>2022-08-17 19:20:52 -0600
committerLuke Shumaker <lukeshu@datawire.io>2022-08-17 19:20:52 -0600
commitb2bf19e062ad1ce46dbf9107f5c3b47354f64d03 (patch)
tree742b1cd56b7e008312cf0fe582e077696232a594 /decode.go
parentcbd5679fa554573506318deb62f5648dbffe027e (diff)
Get the linter passing (even if it means ignoring borrowed files)
Diffstat (limited to 'decode.go')
-rw-r--r--decode.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/decode.go b/decode.go
index 1e90bb1..51402e7 100644
--- a/decode.go
+++ b/decode.go
@@ -71,7 +71,7 @@ func (dec *Decoder) InputOffset() int64 { return dec.io.InputOffset() }
func (dec *Decoder) More() bool {
dec.io.Reset()
_, _, t, e := dec.io.ReadRuneType()
- dec.io.UnreadRune()
+ _ = dec.io.UnreadRune() // best effort
return e == nil && t != RuneTypeEOF
}
@@ -278,7 +278,6 @@ var (
decodableType = reflect.TypeOf((*Decodable)(nil)).Elem()
jsonUnmarshalerType = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem()
textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
- boolType = reflect.TypeOf(true)
float64Type = reflect.TypeOf(float64(0))
)
@@ -553,7 +552,7 @@ func (dec *Decoder) decode(val reflect.Value, nullOK bool) {
}
nameValPtr.Elem().SetUint(n)
default:
- dec.panicType("object", typ, &DecodeArgumentError{nameValTyp})
+ dec.panicType("object", typ, &DecodeArgumentError{Type: nameValTyp})
}
}
dec.stackPush(typ, nameValPtr.Elem())