Handle "naked" CoverArtIDs (IDs of album, mediafiles and playlists)
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
package slice
|
||||
|
||||
func Map[T any, R any](t []T, mapFunc func(T) R) []R {
|
||||
r := make([]R, len(t))
|
||||
for i, e := range t {
|
||||
r[i] = mapFunc(e)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func Group[T any, K comparable](s []T, keyFunc func(T) K) map[K][]T {
|
||||
m := map[K][]T{}
|
||||
for _, item := range s {
|
||||
|
||||
Reference in New Issue
Block a user