fix: resolve golangci-lint errcheck warnings
Some checks failed
CI / Lint (push) Failing after 59s
CI / Test (push) Failing after 1m39s
CI / Release (push) Has been cancelled
CI / Notify (push) Has been cancelled

- Add error checks for unchecked return values (errcheck)
- Remove unused struct fields (unused)
- Fix gofmt formatting issues
This commit is contained in:
2026-02-20 08:45:19 -05:00
parent 81581337cd
commit 39673d31b8
7 changed files with 55 additions and 58 deletions

View File

@@ -200,7 +200,7 @@ func BenchmarkEncodeMap(b *testing.B) {
"top_k": 10,
}
for b.Loop() {
msgpack.Marshal(data)
_, _ = msgpack.Marshal(data)
}
}
@@ -212,7 +212,7 @@ func BenchmarkEncodeStruct(b *testing.B) {
Active: true,
}
for b.Loop() {
msgpack.Marshal(data)
_, _ = msgpack.Marshal(data)
}
}
@@ -226,7 +226,7 @@ func BenchmarkDecodeMap(b *testing.B) {
})
for b.Loop() {
var m map[string]any
msgpack.Unmarshal(raw, &m)
_ = msgpack.Unmarshal(raw, &m)
}
}
@@ -239,7 +239,7 @@ func BenchmarkDecodeStruct(b *testing.B) {
})
for b.Loop() {
var m testMessage
msgpack.Unmarshal(raw, &m)
_ = msgpack.Unmarshal(raw, &m)
}
}
@@ -251,6 +251,6 @@ func BenchmarkDecodeAudio32KB(b *testing.B) {
})
for b.Loop() {
var m audioMessage
msgpack.Unmarshal(raw, &m)
_ = msgpack.Unmarshal(raw, &m)
}
}