Documentation ¶ Overview ¶ Package ptr treats pointers as golang's native options. Index ¶ func Map[T any, R any](t *T, mapper funcs.Mapper[T, R]) *R func Nil[T any]() *T func None[T any]() *T func Of[T any](t T) *T Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Map ¶ added in v0.0.52 func Map[T any, R any](t *T, mapper funcs.Mapper[T, R]) *R func Nil ¶ added in v0.0.52 func Nil[T any]() *T func None ¶ added in v0.0.52 func None[T any]() *T func Of ¶ func Of[T any](t T) *T Of is useful when one needs a one-liner for pointer of expression result; one needs to understand, the t will be passed as a copy, and `ptr.Of(x)` will result in pointer to copy of x. Types ¶ This section is empty. Source Files ¶ View all Source files doc.go map.go nil.go of.go Click to show internal directories. Click to hide internal directories.