convertx

package
v2.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deref

func Deref[T any](t *T) T

Deref 通用解引用

func DerefOr

func DerefOr[T any](ptr *T, or T) T

DerefOr 安全解引用指针,如果为nil时返回指定默认值or

func ToPtr

func ToPtr[T any](t T) *T

ToPtr 将任意值转换为指针

func ToPtrs

func ToPtrs[T any](ts ...T) []*T

ToPtrs 将任意值转换为指针数组

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL