Skip to content

Commit

Permalink
docs: other "empty value" -> "zero value"
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanhong committed Oct 18, 2024
1 parent 3a1528b commit 6140163
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2099,7 +2099,7 @@ subset := lo.Without([]int{0, 2, 10}, 0, 1, 2, 3, 4, 5)

### WithoutEmpty

Returns slice excluding empty values.
Returns slice excluding zero values.

```go
subset := lo.WithoutEmpty([]int{0, 2, 10})
Expand Down Expand Up @@ -2788,7 +2788,7 @@ elements, ok := lo.FromAnySlice([]any{"foobar", "42"})

### Empty

Returns an empty value.
Returns the [zero value](https://go.dev/ref/spec#The_zero_value).

```go
lo.Empty[int]()
Expand Down
2 changes: 1 addition & 1 deletion intersect.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func Without[T comparable, Slice ~[]T](collection Slice, exclude ...T) Slice {
return result
}

// WithoutEmpty returns slice excluding empty values.
// WithoutEmpty returns slice excluding zero values.
//
// Deprecated: Use lo.Compact instead.
func WithoutEmpty[T comparable, Slice ~[]T](collection Slice) Slice {
Expand Down

0 comments on commit 6140163

Please sign in to comment.