Documentation
¶
Overview ¶
util implements trivial util functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assert ¶
Assert does type assertion on v. v is asserted against T and *T. Assert returns true ok when v is either of T or *T. If v is nil *T, then asserted is zero value of T.
func Escape ¶
func Escape[T any](v T) *T
Escape escapes v to a pointer of v.
It is useful when setting built-in type T (e.g. string, int) to struct fields of *T.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.