mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-18 16:24:32 +02:00
Update dependencies, move to non-experimental slices package
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"slices"
|
||||
)
|
||||
|
||||
const UserAgent = "packwiz/packwiz"
|
||||
|
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
|
@@ -3,10 +3,10 @@ package core
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"golang.org/x/exp/slices"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
|
Reference in New Issue
Block a user