chore: sort.Strings → slices.Sort
This commit is contained in:
parent
02a27dde71
commit
f4848deda6
4 changed files with 8 additions and 9 deletions
|
|
@ -8,8 +8,8 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
io_interface "forge.lthn.ai/core/go/pkg/io"
|
||||
|
|
@ -86,7 +86,7 @@ func WriteChecksumFile(fs io_interface.Medium, artifacts []Artifact, path string
|
|||
}
|
||||
|
||||
// Sort lines for consistent output
|
||||
sort.Strings(lines)
|
||||
slices.Sort(lines)
|
||||
|
||||
content := strings.Join(lines, "\n") + "\n"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package dev
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"sort"
|
||||
"slices"
|
||||
|
||||
"forge.lthn.ai/core/cli/pkg/cli"
|
||||
"forge.lthn.ai/core/go/pkg/i18n"
|
||||
|
|
@ -86,8 +86,8 @@ func runImpact(registryPath string, repoName string) error {
|
|||
}
|
||||
|
||||
// Sort for consistent output
|
||||
sort.Strings(direct)
|
||||
sort.Strings(indirect)
|
||||
slices.Sort(direct)
|
||||
slices.Sort(indirect)
|
||||
|
||||
// Print results
|
||||
cli.Blank()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package setup
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"forge.lthn.ai/core/cli/pkg/cli"
|
||||
|
|
@ -188,7 +188,7 @@ func (cs *ChangeSet) printByCategory(category ChangeCategory, title string) {
|
|||
for k := range c.Details {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
slices.Sort(keys)
|
||||
for _, k := range keys {
|
||||
fmt.Printf(" %s: %s\n", dimStyle.Render(k), c.Details[k])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import (
|
|||
"os/exec"
|
||||
"regexp"
|
||||
"slices"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/text/cases"
|
||||
|
|
@ -274,7 +273,7 @@ func formatChangelog(commits []ConventionalCommit, version string) string {
|
|||
remainingTypes = append(remainingTypes, commitType)
|
||||
}
|
||||
}
|
||||
sort.Strings(remainingTypes)
|
||||
slices.Sort(remainingTypes)
|
||||
|
||||
for _, commitType := range remainingTypes {
|
||||
commits := grouped[commitType]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue