Back to Lo

Core Nil

docs/data/core-nil.md

1.53.0197 B
Original Source

Returns a nil pointer of type.

go
lo.Nil[string]()
// (*string)(nil)

lo.Nil[int]()
// (*int)(nil)

Useful when you need a nil pointer of a specific type without declaring a variable first.