Update dependencies, move to non-experimental slices package

This commit is contained in:
comp500
2025-08-10 20:48:20 +01:00
parent a0d66150df
commit a9e091eae8
16 changed files with 137 additions and 60 deletions

View File

@@ -10,7 +10,7 @@ import (
"path/filepath"
"strings"
"golang.org/x/exp/slices"
"slices"
)
const UserAgent = "packwiz/packwiz"

View File

@@ -1,8 +1,9 @@
package core
import (
"golang.org/x/exp/slices"
"path"
"slices"
"strings"
)
// IndexFiles are stored as a map of path -> (indexFile or alias -> indexFile)
@@ -179,11 +180,11 @@ func (f *IndexFiles) toTomlRep() indexFilesTomlRepresentation {
}
}
slices.SortFunc(rep, func(a indexFile, b indexFile) bool {
slices.SortFunc(rep, func(a indexFile, b indexFile) int {
if a.File == b.File {
return a.Alias < b.Alias
return strings.Compare(a.Alias, b.Alias)
} else {
return a.File < b.File
return strings.Compare(a.File, b.File)
}
})

View File

@@ -3,10 +3,10 @@ package core
import (
"errors"
"fmt"
"golang.org/x/exp/slices"
"io"
"os"
"path/filepath"
"slices"
"strings"
"github.com/BurntSushi/toml"