From b3bdd5d8ce559cf95217dba00b6707622596d69e Mon Sep 17 00:00:00 2001 From: findnature <167662920+findnature@users.noreply.github.com> Date: Mon, 23 Jun 2025 22:38:55 +0900 Subject: [PATCH] Media: Replace sort.Slice with slices.Sort for natural ordering (#4981) Signed-off-by: findnature --- pkg/media/report.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/media/report.go b/pkg/media/report.go index 27f6ab375..f14b68a51 100644 --- a/pkg/media/report.go +++ b/pkg/media/report.go @@ -1,6 +1,7 @@ package media import ( + "slices" "sort" "strings" "unicode" @@ -43,9 +44,7 @@ func Report(m fs.TypesExt, withDesc, withType, withExt bool) (rows [][]string, c } for f, ext := range m { - sort.Slice(ext, func(i, j int) bool { - return ext[i] < ext[j] - }) + slices.Sort(ext) v := make([]string, 0, 4) v = append(v, strings.ToUpper(f.String()))