types

package
v0.2.20 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyFullName

func AnyFullName(i any) string

AnyFullName 类型全名

func AnyName

func AnyName(i any) string

AnyName 类型名

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[T any]() string

FullName 类型全名

func Int2Bool

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

Int2Bool int转bool

func Name

func Name[T any]() string

Name 类型名

func New

func New[T any](v T) *T

New 创建并初始化

func Panic2Err

func Panic2Err(panicInfo any) error

Panic2Err panic转换为error

func String2Bytes

func String2Bytes(s string) []byte

String2Bytes 快速string转bytes

func TypeFullName

func TypeFullName(t reflect.Type) string

TypeFullName 类型全名

func TypeName

func TypeName(t reflect.Type) string

TypeName 类型名

func WriteAnyFullName

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

WriteAnyFullName 写入类型全名

func WriteFullName

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

WriteFullName 写入类型全名

func WriteTypeFullName

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

WriteTypeFullName 写入类型全名

func Zero

func Zero[T any]() T

Zero 创建零值

Types

This section is empty.

Jump to

Keyboard shortcuts

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