misc: Upgrade Go to v1.21

Upgrade to 1.21 as 1.20 is now unmaintained.

Most changes are related to the new `slices` package from standard
library, which can replace some existing custom functions.
This commit is contained in:
Michael Manganiello
2024-03-05 09:49:10 -03:00
parent ea1b2f3284
commit 801967a530
19 changed files with 47 additions and 104 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ package widgets
import (
"fmt"
"sort"
"slices"
"strconv"
"strings"
"sync"
@@ -49,7 +49,7 @@ func NewAlbumFilterButton(filter *mediaprovider.AlbumFilter, fetchGenresFunc fun
genreNames := sharedutil.MapSlice(genres, func(g *mediaprovider.Genre) string {
return g.Name
})
sort.Strings(genreNames)
slices.Sort(genreNames)
a.genreListChan <- genreNames
}
}()