Skip to content

Commit

Permalink
Merge branch 'master' of github.com:samber/lo
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Dec 9, 2022
2 parents 7eb64a6 + 0ed7b6e commit a6aabb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func KeyBy[K comparable, V any](collection []V, iteratee func(item V) K) map[K]V
// The order of keys in returned map is not specified and is not guaranteed to be the same from the original array.
// Play: https://go.dev/play/p/WHa2CfMO3Lr
func Associate[T any, K comparable, V any](collection []T, transform func(item T) (K, V)) map[K]V {
result := make(map[K]V)
result := make(map[K]V, len(collection))

for _, t := range collection {
k, v := transform(t)
Expand Down

0 comments on commit a6aabb4

Please sign in to comment.