Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
samber authored Aug 20, 2024
1 parent a9e9a98 commit 3dd51e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2643,19 +2643,19 @@ Checks if a value is nil or if it's a reference type with a nil underlying value

```go
var x int
IsNil(x)
lo.IsNil(x)
// false

var k struct{}
IsNil(k)
lo.IsNil(k)
// false

var i *int
IsNil(i)
lo.IsNil(i)
// true

var ifaceWithNilValue any = (*string)(nil)
IsNil(ifaceWithNilValue)
lo.IsNil(ifaceWithNilValue)
// true
ifaceWithNilValue == nil
// false
Expand Down

0 comments on commit 3dd51e9

Please sign in to comment.