types

package
v0.2.79 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: LGPL-2.1 Imports: 6 Imported by: 0

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 added in v0.2.69

func FullNameRT(t reflect.Type) string

FullNameRT 类型全名

func FullNameT added in v0.2.69

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 added in v0.2.69

func NameRT(t reflect.Type) string

NameRT 类型名

func NameT added in v0.2.69

func NameT[T any]() string

NameT 类型名

func NewCopiedT added in v0.2.70

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

NewCopiedT 新建拷贝值

func NewT added in v0.2.69

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 added in v0.2.69

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

WriteFullNameRT 写入类型全名

func WriteFullNameT added in v0.2.69

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

WriteFullNameT 写入类型全名

func ZeroT added in v0.2.69

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