chore: upgrade golangci-lint to 2.11 and fix lint issues
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -29,7 +29,7 @@ func Stage[In any, Out any](
|
||||
limit := int64(maxWorkers)
|
||||
sem1 := semaphore.NewWeighted(limit)
|
||||
|
||||
go func() {
|
||||
go func() { //nolint:gosec // intentional context.Background() below to wait for workers after ctx cancellation
|
||||
defer close(outputChannel)
|
||||
defer close(errorChannel)
|
||||
|
||||
@@ -58,7 +58,7 @@ func Stage[In any, Out any](
|
||||
// By using context.Background() here we are assuming the fn will stop when the context
|
||||
// is canceled. This is required so we can wait for the workers to finish and avoid closing
|
||||
// the outputChannel before they are done.
|
||||
if err := sem1.Acquire(context.Background(), limit); err != nil {
|
||||
if err := sem1.Acquire(context.Background(), limit); err != nil { //nolint:gosec // intentional: must wait for workers after ctx cancellation
|
||||
log.Error(ctx, "Failed waiting for workers", err)
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user