mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 02:17:25 +02:00
chore: upgrade golangci-lint to 2.11 and fix lint issues
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
f102036dc6
commit
3cd5d16b0a
7 changed files with 13 additions and 6 deletions
|
|
@ -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)
|
||||
}
|
||||
}()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue