Skip to content

Commit

Permalink
ignore untyped nil lint issues (shown in concourse)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSubiros committed Feb 27, 2023
1 parent d7c9ff3 commit 889bc5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func (svc *Service) Close(ctx context.Context) error {
// If kafka consumer exists, stop listening to it.
// This will automatically stop the event consumer loops and no more messages will be processed.
// The kafka consumer will be closed after the service shuts down.
//nolint
if svc.Consumer != nil {
log.Info(ctx, "stopping kafka consumer listener...")
if err := svc.Consumer.StopAndWait(); err != nil {
Expand All @@ -147,6 +148,7 @@ func (svc *Service) Close(ctx context.Context) error {
}

// If kafka producer exists, close it.
//nolint
if svc.Producer != nil {
log.Info(ctx, "closing kafka producer")
if err := svc.Producer.Close(ctx); err != nil {
Expand All @@ -158,6 +160,7 @@ func (svc *Service) Close(ctx context.Context) error {
}

// If kafka consumer exists, close it.
//nolint
if svc.Consumer != nil {
log.Info(ctx, "closing kafka consumer")
if err := svc.Consumer.Close(ctx); err != nil {
Expand Down

0 comments on commit 889bc5a

Please sign in to comment.