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

@@ -66,8 +66,8 @@ func TestCallbackRegistration(t *testing.T) {
}
// Verify setup/teardown work when called directly.
h.onSetup(context.Background())
h.onTeardown(context.Background())
_ = h.onSetup(context.Background())
_ = h.onTeardown(context.Background())
if !setupCalled || !teardownCalled {
t.Error("callbacks should have been invoked")
}
@@ -290,7 +290,7 @@ func BenchmarkWrapTypedHandler(b *testing.B) {
h := New("ai.test", cfg)
h.OnTypedMessage(func(ctx context.Context, msg *nats.Msg) (any, error) {
var req benchReq
msgpack.Unmarshal(msg.Data, &req)
_ = msgpack.Unmarshal(msg.Data, &req)
return map[string]any{"ok": true}, nil
})