Documentation
¶
Overview ¶
Package generics contains helper functions for working with go generics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Zero ¶
func Zero[T any]() T
Zero just provides a concise way to return the zero value of the instantiated value of a type parameter. Mostly useful when returning an error from a generic function or method. It doesn't do any magic, but is just convenient shorthand for declaring a variable of the parametric type, and returning that variable.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.