types

package
v0.0.0-...-7647e70 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 6 Imported by: 91

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(value any) bool

Bool 将值转换成bool类型

func Byte

func Byte(value any) byte

Byte 将值转换成byte

func Compare

func Compare(value1 any, value2 any) int8

Compare 比较两个值大小 返回值可能时-1, 0, 1

func Float32

func Float32(value any) float32

Float32 将值转换成float32

func Float64

func Float64(value any) float64

Float64 将值转换成float64

func Int

func Int(value any) int

Int 将值转换成int

func Int16

func Int16(value any) int16

Int16 将值转换成int16

func Int32

func Int32(value any) int32

Int32 将值转换成int32

func Int64

func Int64(value any) int64

Int64 将值转换成int64

func Int8

func Int8(value any) int8

Int8 将值转换成int8

func IsFloat

func IsFloat(value any) bool

IsFloat 判断是否为浮点型数字

func IsInteger

func IsInteger(value any) bool

IsInteger 判断是否为整形数字

func IsMap

func IsMap(value any) bool

IsMap 判断是否为Map

func IsNil

func IsNil(value any) bool

IsNil 判断是否为nil

func IsNumber

func IsNumber(value any) bool

IsNumber 判断是否为数字

func IsNumberKind

func IsNumberKind(kind reflect.Kind) (unsigned bool, isFloat bool, ok bool)

IsNumberKind 判断是否为数字类型

func IsSlice

func IsSlice(value any) bool

IsSlice 判断是否为Slice

func Slice

func Slice(fromSlice any, toSliceType reflect.Type) (any, error)

Slice 转换Slice类型

func String

func String(value any) string

String 将值转换成字符串

func Uint

func Uint(value any) uint

Uint 将值转换成uint

func Uint16

func Uint16(value any) uint16

Uint16 将值转换成uint16

func Uint32

func Uint32(value any) uint32

Uint32 将值转换成uint32

func Uint64

func Uint64(value any) uint64

Uint64 将值转换成uint64

func Uint8

func Uint8(value any) uint8

Uint8 将值转换成uint8

Types

This section is empty.

Jump to

Keyboard shortcuts

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