types

package
v0.3.32 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: LGPL-2.1 Imports: 6 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool2Int

func Bool2Int[T constraints.Integer](b bool) T

Bool2Int bool转int

func Bytes2String

func Bytes2String(b []byte) string

Bytes2String 快速bytes转string

func FullName

func FullName(i any) string

FullName 类型全名

func FullNameRT

func FullNameRT(t reflect.Type) string

FullNameRT 类型全名

func FullNameT

func FullNameT[T any]() string

FullNameT 类型全名

func Int2Bool

func Int2Bool[T constraints.Integer](v T) bool

Int2Bool int转bool

func Name

func Name(i any) string

Name 类型名

func NameRT

func NameRT(t reflect.Type) string

NameRT 类型名

func NameT

func NameT[T any]() string

NameT 类型名

func NewCopiedT

func NewCopiedT[T any](src T) *T

NewCopiedT 新建拷贝值

func NewT

func NewT[T any]() *T

NewT 新建零值

func Panic2Err

func Panic2Err(panicInfo any) error

Panic2Err panic转换为error

func String2Bytes

func String2Bytes(s string) []byte

String2Bytes 快速string转bytes

func WriteAnyFullName

func WriteAnyFullName(sb *strings.Builder, i any)

WriteAnyFullName 写入类型全名

func WriteFullNameRT

func WriteFullNameRT(sb *strings.Builder, t reflect.Type)

WriteFullNameRT 写入类型全名

func WriteFullNameT

func WriteFullNameT[T any](sb *strings.Builder)

WriteFullNameT 写入类型全名

func ZeroT

func ZeroT[T any]() T

ZeroT 创建零值

Types

This section is empty.

Jump to

Keyboard shortcuts

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