bumped up golang version to 1.23

This commit is contained in:
2025-06-22 19:35:57 +02:00
parent efc99a9658
commit cc2ead6c4e
11 changed files with 68 additions and 30 deletions

2
to.go
View File

@ -36,7 +36,7 @@ func ToList[T any](s []T) *list.List {
// ToMap returns a map containing all values of s.
// The map key-value pairs are determined by mapper
func ToMap[T any, K comparable, V any](s []T, mapper func(T) (K, V)) map[K]V {
func ToMap[T any, K comparable, V any](s []T, mapper MapMapper[T, K, V]) map[K]V {
m := map[K]V{}
Each(s, func(value T) {
k, v := mapper(value)