Back to Lo

Core Withoutempty

docs/data/core-withoutempty.md

1.53.0133 B
Original Source

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

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