Documentation
¶
Overview ¶
Package utils: Private utilities handling pointers and zero values Provides generic functions to handle pointers and value extraction
utils: 指针和零值操作的内部工具包 提供用于处理指针创建和值提取的泛型函数
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPointerValue ¶
func GetPointerValue[T any](v *T) T
GetPointerValue returns the value pointed to, returns zero value if nil Safe dereference that handles nil pointers without panic
返回指针指向的值,如果为 nil 则返回零值 安全的解引用操作,处理 nil 指针时不会 panic
func GetValuePointer ¶
func GetValuePointer[T any](v T) *T
GetValuePointer returns a pointer to the given value Creates a new pointer pointing to a clone of the input value
返回给定值的指针 创建一个指向输入值副本的新指针
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.