Skip to content

🎧 Your Personal Streaming Service

Use new `slices` package from Go standard lib

Deluan97c7e5daafde
diff --git a/core/agents/lastfm/client.go b/core/agents/lastfm/client.go
index a993ddc51..72cd66cd3 100644
--- a/core/agents/lastfm/client.go
+++ b/core/agents/lastfm/client.go
@@ -8,13 +8,13 @@ import (
"fmt"
"net/http"
"net/url"
+ "slices"
"sort"
"strconv"
"strings"
"time"
"github.com/navidrome/navidrome/log"
- "golang.org/x/exp/slices"
)
const (
diff --git a/db/migration/20230112111457_add_album_paths.go b/db/migration/20230112111457_add_album_paths.go
index 6cf5aefd9..2dfb9a747 100644
--- a/db/migration/20230112111457_add_album_paths.go
+++ b/db/migration/20230112111457_add_album_paths.go
@@ -4,12 +4,12 @@ import (
"context"
"database/sql"
"path/filepath"
+ "slices"
"strings"
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/log"
"github.com/pressly/goose/v3"
- "golang.org/x/exp/slices"
)
func init() {
diff --git a/db/migration/20230202143713_change_path_list_separator.go b/db/migration/20230202143713_change_path_list_separator.go
index fafee7f2d..78b030ae4 100644
--- a/db/migration/20230202143713_change_path_list_separator.go
+++ b/db/migration/20230202143713_change_path_list_separator.go
@@ -4,12 +4,12 @@ import (
"context"
"database/sql"
"path/filepath"
+ "slices"
"strings"
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/log"
"github.com/pressly/goose/v3"
- "golang.org/x/exp/slices"
)
func init() {
diff --git a/db/migration/20230209181414_change_image_files_list_separator.go b/db/migration/20230209181414_change_image_files_list_separator.go
index 8f0b741a4..7f4d4cb0e 100644
--- a/db/migration/20230209181414_change_image_files_list_separator.go
+++ b/db/migration/20230209181414_change_image_files_list_separator.go
@@ -4,12 +4,12 @@ import (
"context"
"database/sql"
"path/filepath"
+ "slices"
"strings"
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/log"
"github.com/pressly/goose/v3"
- "golang.org/x/exp/slices"
)
func init() {
diff --git a/model/album.go b/model/album.go
index efe56557a..d5bf574c5 100644
--- a/model/album.go
+++ b/model/album.go
@@ -2,10 +2,10 @@ package model
import (
"cmp"
+ "slices"
"time"
"github.com/navidrome/navidrome/utils/slice"
- "golang.org/x/exp/slices"
)
type Album struct {
diff --git a/model/file_types.go b/model/file_types.go
index 78dd7eaff..da44ac2d8 100644
--- a/model/file_types.go
+++ b/model/file_types.go
@@ -3,9 +3,8 @@ package model
import (
"mime"
"path/filepath"
+ "slices"
"strings"
-
- "golang.org/x/exp/slices"
)
var excludeAudioType = []string{
diff --git a/model/mediafile.go b/model/mediafile.go
index 00577e208..fc8793cae 100644
--- a/model/mediafile.go
+++ b/model/mediafile.go
@@ -5,6 +5,7 @@ import (
"encoding/json"
"mime"
"path/filepath"
+ "slices"
"sort"
"strings"
"time"
@@ -13,7 +14,6 @@ import (
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/utils"
"github.com/navidrome/navidrome/utils/slice"
- "golang.org/x/exp/slices"
)
type MediaFile struct {
diff --git a/model/playlist.go b/model/playlist.go
index e556aeb9b..73707bb5b 100644
--- a/model/playlist.go
+++ b/model/playlist.go
@@ -2,12 +2,12 @@ package model
import (
"fmt"
+ "slices"
"strconv"
"strings"
"time"
"github.com/navidrome/navidrome/model/criteria"
- "golang.org/x/exp/slices"
)
type Playlist struct {
diff --git a/scanner/metadata/metadata_test.go b/scanner/metadata/metadata_test.go
index 65bced7ea..3c0279e14 100644
--- a/scanner/metadata/metadata_test.go
+++ b/scanner/metadata/metadata_test.go
@@ -3,6 +3,7 @@ package metadata_test
import (
"cmp"
"encoding/json"
+ "slices"
"github.com/navidrome/navidrome/conf"
"github.com/navidrome/navidrome/conf/configtest"
@@ -13,7 +14,6 @@ import (
_ "github.com/navidrome/navidrome/scanner/metadata/taglib"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
- "golang.org/x/exp/slices"
)
var _ = Describe("Tags", func() {