package
Version:
v2.2.1
Opens a new window with list of versions in this module.
Published: Apr 10, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Deref[T any](t *T) T
Deref 通用解引用
func DerefOr[T any](ptr *T, or T) T
DerefOr 安全解引用指针,如果为nil时返回指定默认值or
func ToPtr[T any](t T) *T
ToPtr 将任意值转换为指针
func ToPtrs[T any](ts ...T) []*T
ToPtrs 将任意值转换为指针数组
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.