{"modulePath":"github.com/Compogo/tools","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package pointer\n\n## Functions\n\n```go\nfunc Pointer[T any](value T) *T\n```\nPointer returns a pointer to the given value. Useful for creating pointers in one line, e.g.: tools.Pointer(\"hello\")\n\n```go\nfunc PointerOrNil[T any](value T) *T\n```\nPointerOrNil returns a pointer to the value if it's not the zero value of its type. If the value is the zero value, returns nil. Uses reflect.ValueOf(value).IsZero() for comparison.\n\n```go\nfunc PointerValue[T any](value *T) T\n```\nPointerValue safely returns the value from a pointer. If the pointer is nil, returns the zero value of type T.\n\n","path":"github.com/Compogo/tools/pointer","name":"pointer","synopsis":"","isRedistributable":true}
