Documentation ¶ Index ¶ func Is[T any]() bool func Of[T any](val T) *T Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Is ¶ func Is[T any]() bool Is checks if the generic parameter is a pointer type. Returns true if T is a pointer, false otherwise. func Of ¶ func Of[T any](val T) *T Of allocates a new instance of the given type, copies the value into it, and returns it. This can be used as a utility to make pointers to static values. For example: Of[uint](123) returns a uint pointer containing the value 123. Types ¶ This section is empty. Source Files ¶ View all Source files ptr.go Click to show internal directories. Click to hide internal directories.