Skip to content

Commit

Permalink
deprecate methods added in Go 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
stefafafan committed Aug 19, 2024
1 parent 26e7b6c commit f3d6130
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions godash.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func GroupBy[T any, U comparable](collection []T, iteratee func(item T) U) map[U
}

// Chunk receives the collection and chunks it into a slice of slices each of the given size.
// Deprecated: Use https://pkg.go.dev/slices#Chunk instead.
func Chunk[T any](collection []T, size int) [][]T {
return lo.Chunk(collection, size)
}
Expand All @@ -63,11 +64,13 @@ func KeyBy[K comparable, V any](collection []V, iteratee func(item V) K) map[K]V
}

// Keys returns the keys of the map as a slice.
// Deprecated: Use https://pkg.go.dev/maps#Keys instead.
func Keys[K comparable, V any](in map[K]V) []K {
return lo.Keys(in)
}

// Values returns the values of the map as a slice.
// Deprecated: Use https://pkg.go.dev/maps#Values instead.
func Values[K comparable, V any](in map[K]V) []V {
return lo.Values(in)
}
Expand Down

0 comments on commit f3d6130

Please sign in to comment.