Use new `slices` package from Go standard lib

This commit is contained in:
Deluan 2024-02-16 22:00:44 -05:00
parent 166eb37787
commit 97c7e5daaf
9 changed files with 9 additions and 10 deletions

View File

@ -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 (

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -2,10 +2,10 @@ package model
import (
"cmp"
"slices"
"time"
"github.com/navidrome/navidrome/utils/slice"
"golang.org/x/exp/slices"
)
type Album struct {

View File

@ -3,9 +3,8 @@ package model
import (
"mime"
"path/filepath"
"slices"
"strings"
"golang.org/x/exp/slices"
)
var excludeAudioType = []string{

View File

@ -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 {

View File

@ -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 {

View File

@ -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() {