fix: resolve golangci-lint errcheck warnings
- Add error checks for unchecked return values (errcheck) - Remove unused struct fields (unused) - Fix gofmt formatting issues
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user