Files
lo/docs/data/core-withoutempty.md
T
Samuel Berthe fa095e4b4f fix(doc): fix go playground demo URL (#832)
* fix(doc): fix go playground demo URL

* fix(doc): add more go playground demo URL
2026-03-06 00:09:59 +01:00

536 B

name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
name slug sourceRef category subCategory playUrl variantHelpers similarHelpers position signatures
WithoutEmpty withoutempty intersect.go#L218 core intersect https://go.dev/play/p/iZvYJWuniJm
core#intersect#withoutempty
core#slice#compact
core#intersect#without
core#intersect#withoutby
130
func WithoutEmpty[T comparable, Slice ~[]T](collection Slice) Slice

Returns a slice excluding zero values. Deprecated: use Compact instead.

lo.WithoutEmpty([]int{0, 2, 10})
// []int{2, 10}