Skip to content

fix(nats): resolve golangci-lint failures (gosec G118, revive)#2

Merged
AlpNuhoglu merged 1 commit into
mainfrom
feature/nats-jetstream-messaging
Jun 16, 2026
Merged

fix(nats): resolve golangci-lint failures (gosec G118, revive)#2
AlpNuhoglu merged 1 commit into
mainfrom
feature/nats-jetstream-messaging

Conversation

@AlpNuhoglu

Copy link
Copy Markdown
Owner
  • Fix gosec G118 (potential context leak) in nats.go: Removed the derived context and per-consumer CancelFunc. Consumer drain goroutines now listen on a shared b.stop channel that is closed during Close(). This provides cleaner, idempotent-safe early shutdowns without tracking individual cancellations.
  • Fix revive unused-parameter in nats_test.go: Renamed unused Event parameter to _.

- Fix gosec G118 (potential context leak) in `nats.go`: Removed the
  derived context and per-consumer `CancelFunc`. Consumer drain
  goroutines now listen on a shared `b.stop` channel that is closed
  during `Close()`. This provides cleaner, idempotent-safe early
  shutdowns without tracking individual cancellations.
- Fix revive unused-parameter in `nats_test.go`: Renamed unused
  `Event` parameter to `_`.
@AlpNuhoglu AlpNuhoglu merged commit eca7376 into main Jun 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant