mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-13 05:38:47 +01:00
Upgrade Go to 1.23 (#3190)
* Upgrade to Golang 1.23rc1 * Fix imports * Go 1.23 final version * Fix lint compatibility with ci-goreleaser
This commit is contained in:
parent
0c33523f45
commit
c4bd0e67fa
6 changed files with 17 additions and 15 deletions
|
|
@ -4,6 +4,8 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"maps"
|
||||
"slices"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
|
@ -14,7 +16,6 @@ import (
|
|||
"github.com/navidrome/navidrome/model/request"
|
||||
"github.com/navidrome/navidrome/utils/cache"
|
||||
"github.com/navidrome/navidrome/utils/pl"
|
||||
"golang.org/x/exp/maps"
|
||||
)
|
||||
|
||||
type CacheWarmer interface {
|
||||
|
|
@ -94,7 +95,7 @@ func (a *cacheWarmer) run(ctx context.Context) {
|
|||
continue
|
||||
}
|
||||
|
||||
batch := maps.Keys(a.buffer)
|
||||
batch := slices.Collect(maps.Keys(a.buffer))
|
||||
a.buffer = make(map[model.ArtworkID]struct{})
|
||||
a.mutex.Unlock()
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ func (pd *Queue) getMediaFileIndexByID(id string) (int, error) {
|
|||
return idx, nil
|
||||
}
|
||||
}
|
||||
return -1, fmt.Errorf("ID not found in playlist: " + id)
|
||||
return -1, fmt.Errorf("ID not found in playlist: %s", id)
|
||||
}
|
||||
|
||||
// Sets the index to a new, valid value inside the Items. Values lower than zero are going to be zero,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue