mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
29 lines
554 B
Markdown
29 lines
554 B
Markdown
---
|
|
name: Without
|
|
slug: without
|
|
sourceRef: intersect.go#L181
|
|
category: core
|
|
subCategory: intersect
|
|
playUrl: https://go.dev/play/p/PcAVtYJsEsS
|
|
variantHelpers:
|
|
- core#intersect#without
|
|
similarHelpers:
|
|
- core#intersect#withoutby
|
|
- core#intersect#intersect
|
|
- core#intersect#difference
|
|
- core#intersect#union
|
|
- core#slice#reject
|
|
position: 110
|
|
signatures:
|
|
- "func Without[T comparable, Slice ~[]T](collection Slice, exclude ...T) Slice"
|
|
---
|
|
|
|
Returns a slice excluding all given values.
|
|
|
|
```go
|
|
lo.Without([]int{0, 2, 10}, 2)
|
|
// []int{0, 10}
|
|
```
|
|
|
|
|