mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
607 B
607 B
name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
| name | slug | sourceRef | category | subCategory | signatures | playUrl | variantHelpers | similarHelpers | position | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Empty | empty | it/type_manipulation.go#L44 | it | type |
|
https://go.dev/play/p/E5fF1hH8Bc3 |
|
|
0 |
Returns an empty sequence of the specified type.
Examples:
emptySeq := it.Empty[int]()
count := 0
for range emptySeq {
count++
}
// count == 0
emptySeq := it.Empty[string]()
var result []string
for v := range emptySeq {
result = append(result, v)
}
// result is empty slice