Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func As ¶
As performs a type assertion to the given type. It returns the asserted value and a boolean indicating whether the assertion succeeded.
func Cast ¶
Cast performs a type assertion to the given type. It will panic if the type assertion fails.
func Stub ¶
Stub is a stub left empty by intent.
For instance, to check generic types implement certain interfaces, a blank ('_') function declaration can be used to check the type definition.
Example:
func _[K]() MyInterface[K] {
return Stub[MyImplementation[K]]()
}
func TODO ¶
TODO is a function to create holes when stubbing out more complex mechanisms.
By default, it will panic with 'TODO: provide a value of type <type>' where <type> is the type of V. The panic message can be altered by passing in additional args that will be printed as 'TODO: <args separated by space>'
Types ¶
This section is empty.