convert

package
v0.8.13 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package convert 结构体转换为map[string]string NOTE 2024-05-11

Package convert 提供了一组转换函数,用于将uint类型的值转换为其他类型。

Package convert 提供了一组转换函数,用于将uint16类型的值转换为其他类型。

Package convert 提供了一组转换函数,用于将uint32类型的值转换为其他类型。

Package convert 提供了一组转换函数,用于将uint64类型的值转换为其他类型。

Package convert 提供了一组转换函数,用于将uint8类型的值转换为其他类型。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToAny added in v0.8.12

func AnyToAny(src any, dstPtr any) error

AnyToAny 任意基础类型转为任意基础类型 dstPtr为目标变量的指针

func AnyToBool

func AnyToBool(value any) (bool, error)

AnyToBool 任意基础类型转为bool类型.

func AnyToFloat32

func AnyToFloat32(value any) (float32, error)

AnyToFloat32 任意基础类型转为float32类型.

func AnyToFloat64

func AnyToFloat64(value any) (float64, error)

AnyToFloat64 任意基础类型转为float64类型.

func AnyToInt

func AnyToInt(value any) (int, error)

AnyToInt 任意基础类型转为int类型. 注意:浮点数到int的转换会丢失小数部分。

func AnyToInt16

func AnyToInt16(value any) (int16, error)

AnyToInt16 任意基础类型转为int16类型. 注意:浮点数到int16的转换会丢失小数部分。

func AnyToInt32

func AnyToInt32(value any) (int32, error)

AnyToInt32 任意基础类型转为int32类型. 注意:浮点数到int32的转换会丢失小数部分。

func AnyToInt64

func AnyToInt64(value any) (int64, error)

AnyToInt64 任意基础类型转为int64类型. 注意:浮点数到int64的转换会丢失小数部分。

func AnyToInt8

func AnyToInt8(value any) (int8, error)

AnyToInt8 任意基础类型转为int8类型. 注意:浮点数到int8的转换会丢失小数部分。

func AnyToString

func AnyToString(value any) (string, error)

AnyToString 任意基础类型转为string类型.

func AnyToUint

func AnyToUint(value any) (uint, error)

AnyToUint 任意基础类型转为uint类型. 注意:浮点数到int的转换会丢失小数部分。

func AnyToUint16

func AnyToUint16(value any) (uint16, error)

AnyToUint16 任意基础类型转为uint16类型. 注意:浮点数到int16的转换会丢失小数部分。

func AnyToUint32

func AnyToUint32(value any) (uint32, error)

AnyToUint32 任意基础类型转为uint32类型. 注意:浮点数到int32的转换会丢失小数部分。

func AnyToUint64

func AnyToUint64(value any) (uint64, error)

AnyToUint64 任意基础类型转为uint64类型. 注意:浮点数到int64的转换会丢失小数部分。

func AnyToUint8

func AnyToUint8(value any) (uint8, error)

AnyToUint8 任意基础类型转为uint8类型. 注意:浮点数到int8的转换会丢失小数部分。

func BoolToInt

func BoolToInt(value bool) int

func BoolToString

func BoolToString(value bool) string

func Float32ToBool

func Float32ToBool(value float32) bool

Float32ToBool 将 float32 转换为 bool

func Float32ToFloat64

func Float32ToFloat64(value float32) (float64, error)

Float32ToFloat64 将float32类型转换为float64类型,直接进行类型转换

func Float32ToInt

func Float32ToInt(value float32) (int, error)

Float32ToInt 将 float32 转换为 int,检查溢出

func Float32ToInt16

func Float32ToInt16(value float32) (int16, error)

Float32ToInt16 将 float32 转换为 int16,检查溢出

func Float32ToInt32

func Float32ToInt32(value float32) (int32, error)

Float32ToInt32 将 float32 转换为 int32,检查溢出

func Float32ToInt64

func Float32ToInt64(value float32) (int64, error)

Float32ToInt64 将 float32 转换为 int64,检查溢出

func Float32ToInt8

func Float32ToInt8(value float32) (int8, error)

Float32ToInt8 将 float32 转换为 int8,检查溢出

func Float32ToString

func Float32ToString(value float32) string

Float32ToString 将 float32 转换为 string

func Float32ToUint

func Float32ToUint(value float32) (uint, error)

Float32ToUint 将 float32 转换为 uint,检查溢出

func Float32ToUint16

func Float32ToUint16(value float32) (uint16, error)

Float32ToUint16 将 float32 转换为 uint16,检查溢出

func Float32ToUint32

func Float32ToUint32(value float32) (uint32, error)

Float32ToUint32 将 float32 转换为 uint32,检查溢出

func Float32ToUint64

func Float32ToUint64(value float32) (uint64, error)

Float32ToUint64 将 float32 转换为 uint64,检查溢出

func Float32ToUint8

func Float32ToUint8(value float32) (uint8, error)

Float32ToUint8 将 float32 转换为 uint8,检查溢出

func Float64ToBool

func Float64ToBool(value float64) bool

Float64ToBool 将 float64 转换为 bool

func Float64ToFloat32

func Float64ToFloat32(value float64) (float32, error)

Float64ToFloat32 将float64类型转换为float32类型,直接进行类型转换

func Float64ToInt

func Float64ToInt(value float64) (int, error)

Float64ToInt 将 float64 转换为 int,检查溢出

func Float64ToInt16

func Float64ToInt16(value float64) (int16, error)

Float64ToInt16 将 float64 转换为 int16,检查溢出

func Float64ToInt32

func Float64ToInt32(value float64) (int32, error)

Float64ToInt32 将 float64 转换为 int32,检查溢出

func Float64ToInt64

func Float64ToInt64(value float64) (int64, error)

Float64ToInt64 将 float64 转换为 int64,检查溢出

func Float64ToInt8

func Float64ToInt8(value float64) (int8, error)

Float64ToInt8 将 float64 转换为 int8,检查溢出

func Float64ToString

func Float64ToString(value float64) string

Float64ToString 将 float64 转换为 string

func Float64ToUint

func Float64ToUint(value float64) (uint, error)

Float64ToUint 将 float64 转换为 uint,检查溢出

func Float64ToUint16

func Float64ToUint16(value float64) (uint16, error)

Float64ToUint16 将 float64 转换为 uint16,检查溢出

func Float64ToUint32

func Float64ToUint32(value float64) (uint32, error)

Float64ToUint32 将 float64 转换为 uint32,检查溢出

func Float64ToUint64

func Float64ToUint64(value float64) (uint64, error)

Float64ToUint64 将 float64 转换为 uint64,检查溢出

func Float64ToUint8

func Float64ToUint8(value float64) (uint8, error)

Float64ToUint8 将 float64 转换为 uint8,检查溢出

func Int16ToBool

func Int16ToBool(value int16) bool

Int16ToBool 将 int16 转换为 bool,非零值转换为 true,零值转换为 false。

func Int16ToFloat32

func Int16ToFloat32(value int16) (float32, error)

Int16ToFloat32 将 int16 转换为 float32,直接转换即可。

func Int16ToFloat64

func Int16ToFloat64(value int16) (float64, error)

Int16ToFloat64 将 int16 转换为 float64,直接转换即可。

func Int16ToInt

func Int16ToInt(value int16) (int, error)

Int16ToInt 将 int16 转换为 int,由于 int16 的范围完全包含在 int 中,所以直接转换即可。

func Int16ToInt32

func Int16ToInt32(value int16) (int32, error)

Int16ToInt32 将 int16 转换为 int32,由于 int16 的范围完全包含在 int32 中,所以直接转换即可。

func Int16ToInt64

func Int16ToInt64(value int16) (int64, error)

Int16ToInt64 将 int16 转换为 int64,由于 int16 的范围完全包含在 int64 中,所以直接转换即可。

func Int16ToInt8

func Int16ToInt8(value int16) (int8, error)

Int16ToInt8 将 int16 转换为 int8,需要检查是否超出 int8 的范围。

func Int16ToString

func Int16ToString(value int16) string

Int16ToString 将 int16 转换为 string,使用 strconv.Itoa 函数进行转换。

func Int16ToUint

func Int16ToUint(value int16) (uint, error)

Int16ToUint 将 int16 转换为 uint。

func Int16ToUint16

func Int16ToUint16(value int16) (uint16, error)

Int16ToUint16 将 int16 转换为 uint16。

func Int16ToUint32

func Int16ToUint32(value int16) (uint32, error)

Int16ToUint32 将 int16 转换为 uint32。

func Int16ToUint64

func Int16ToUint64(value int16) (uint64, error)

Int16ToUint64 将 int16 转换为 uint64,由于 uint64 是无符号类型,不需要检查负数。

func Int16ToUint8

func Int16ToUint8(value int16) (uint8, error)

Int16ToUint8 将 int16 转换为 uint8,需要检查是否超出 uint8 的范围。

func Int32ToBool

func Int32ToBool(value int32) bool

Int32ToBool 将int32类型转换为bool类型,非零值转换为true,零值转换为false

func Int32ToFloat32

func Int32ToFloat32(value int32) (float32, error)

Int32ToFloat32 将int32类型转换为float32类型,直接转换

func Int32ToFloat64

func Int32ToFloat64(value int32) (float64, error)

Int32ToFloat64 将int32类型转换为float64类型,直接转换

func Int32ToInt

func Int32ToInt(value int32) (int, error)

Int32ToInt 将int32类型转换为int类型,由于int32在int范围内,所以直接转换

func Int32ToInt16

func Int32ToInt16(value int32) (int16, error)

Int32ToInt16 将int32类型转换为int16类型,先检查是否在int16范围内,然后进行转换

func Int32ToInt64

func Int32ToInt64(value int32) (int64, error)

Int32ToInt64 将int32类型转换为int64类型,由于int32在int64范围内,所以直接转换

func Int32ToInt8

func Int32ToInt8(value int32) (int8, error)

Int32ToInt8 将int32类型转换为int8类型,先检查是否在int8范围内,然后进行转换

func Int32ToString

func Int32ToString(value int32) string

Int32ToString 将int32类型转换为string类型,使用strconv.Itoa函数进行转换

func Int32ToUint

func Int32ToUint(value int32) (uint, error)

Int32ToUint 将int32类型转换为uint类型,先检查是否为负数,然后进行转换

func Int32ToUint16

func Int32ToUint16(value int32) (uint16, error)

Int32ToUint16 将int32类型转换为uint16类型,先检查是否为负数,然后检查是否在uint16范围内,然后进行转换

func Int32ToUint32

func Int32ToUint32(value int32) (uint32, error)

Int32ToUint32 将int32类型转换为uint32类型,先检查是否为负数,然后直接转换

func Int32ToUint64

func Int32ToUint64(value int32) (uint64, error)

Int32ToUint64 将int32类型转换为uint64类型,先检查是否为负数,然后直接转换

func Int32ToUint8

func Int32ToUint8(value int32) (uint8, error)

Int32ToUint8 将int32类型转换为uint8类型,先检查是否为负数,然后检查是否在uint8范围内,然后进行转换

func Int64ToBool

func Int64ToBool(value int64) bool

Int64ToBool 将int64类型转换为bool类型,非零值转换为true,零值转换为false

func Int64ToFloat32

func Int64ToFloat32(value int64) (float32, error)

Int64ToFloat32 将int64类型转换为float32类型,直接转换

func Int64ToFloat64

func Int64ToFloat64(value int64) (float64, error)

Int64ToFloat64 将int64类型转换为float64类型,直接转换

func Int64ToInt

func Int64ToInt(value int64) (int, error)

Int64ToInt 将int64类型转换为int类型,先检查是否在int范围内,然后进行转换

func Int64ToInt16

func Int64ToInt16(value int64) (int16, error)

Int64ToInt16 将int64类型转换为int16类型,先检查是否在int16范围内,然后进行转换

func Int64ToInt32

func Int64ToInt32(value int64) (int32, error)

Int64ToInt32 将int64类型转换为int32类型,先检查是否在int32范围内,然后进行转换

func Int64ToInt8

func Int64ToInt8(value int64) (int8, error)

Int64ToInt8 将int64类型转换为int8类型,先检查是否在int8范围内,然后进行转换

func Int64ToString

func Int64ToString(value int64) string

Int64ToString 将int64类型转换为string类型,使用strconv.FormatInt函数进行转换

func Int64ToUint

func Int64ToUint(value int64) (uint, error)

Int64ToUint 将int64类型转换为uint类型,先检查是否为负数,然后检查是否在uint范围内,然后进行转换

func Int64ToUint16

func Int64ToUint16(value int64) (uint16, error)

Int64ToUint16 将int64类型转换为uint16类型,先检查是否为负数,然后检查是否在uint16范围内,然后进行转换

func Int64ToUint32

func Int64ToUint32(value int64) (uint32, error)

Int64ToUint32 将int64类型转换为uint32类型,先检查是否为负数,然后检查是否在uint32范围内,然后进行转换

func Int64ToUint64

func Int64ToUint64(value int64) (uint64, error)

Int64ToUint64 将int64类型转换为uint64类型,先检查是否为负数,然后直接转换

func Int64ToUint8

func Int64ToUint8(value int64) (uint8, error)

Int64ToUint8 将int64类型转换为uint8类型,先检查是否为负数,然后检查是否在uint8范围内,然后进行转换

func Int8ToBool

func Int8ToBool(value int8) bool

Int8ToBool 将int8类型转换为bool类型,非零值转换为true,零值转换为false

func Int8ToFloat32

func Int8ToFloat32(value int8) (float32, error)

Int8ToFloat32 将int8类型转换为float32类型,直接转换

func Int8ToFloat64

func Int8ToFloat64(value int8) (float64, error)

Int8ToFloat64 将int8类型转换为float64类型,直接转换

func Int8ToInt

func Int8ToInt(value int8) (int, error)

Int8ToInt 将int8类型转换为int类型,由于int8在int范围内,直接转换

func Int8ToInt16

func Int8ToInt16(value int8) (int16, error)

Int8ToInt16 将int8类型转换为int16类型,由于int8在int16范围内,直接转换

func Int8ToInt32

func Int8ToInt32(value int8) (int32, error)

Int8ToInt32 将int8类型转换为int32类型,由于int8在int32范围内,直接转换

func Int8ToInt64

func Int8ToInt64(value int8) (int64, error)

Int8ToInt64 将int8类型转换为int64类型,由于int8在int64范围内,直接转换

func Int8ToString

func Int8ToString(value int8) string

Int8ToString 将int8类型转换为string类型,使用strconv.Itoa函数转换

func Int8ToUint

func Int8ToUint(value int8) (uint, error)

Int8ToUint 将int8类型转换为uint类型,如果value为负数则返回错误,否则直接转换

func Int8ToUint16

func Int8ToUint16(value int8) (uint16, error)

Int8ToUint16 将int8类型转换为uint16类型,如果value为负数则返回错误,否则直接转换

func Int8ToUint32

func Int8ToUint32(value int8) (uint32, error)

Int8ToUint32 将int8类型转换为uint32类型,如果value为负数则返回错误,否则直接转换

func Int8ToUint64

func Int8ToUint64(value int8) (uint64, error)

Int8ToUint64 将int8类型转换为uint64类型,如果value为负数则返回错误,否则直接转换

func Int8ToUint8

func Int8ToUint8(value int8) (uint8, error)

Int8ToUint8 将int8类型转换为uint8类型,如果value为负数则返回错误,否则直接转换

func IntToBool

func IntToBool(value int) bool

IntToBool 将int类型转换为bool类型,非零值转换为true,零值转换为false

func IntToFloat32

func IntToFloat32(value int) (float32, error)

IntToFloat32 将int类型转换为float32类型,不需要检查溢出

func IntToFloat64

func IntToFloat64(value int) (float64, error)

IntToFloat64 将int类型转换为float64类型,不需要检查溢出

func IntToInt16

func IntToInt16(value int) (int16, error)

IntToInt16 将int类型转换为int16类型,检查是否发生溢出

func IntToInt32

func IntToInt32(value int) (int32, error)

IntToInt32 将int类型转换为int32类型,检查是否发生溢出

func IntToInt64

func IntToInt64(value int) (int64, error)

IntToInt64 将int类型转换为int64类型,不需要检查溢出

func IntToInt8

func IntToInt8(value int) (int8, error)

IntToInt8 将int类型转换为int8类型,检查是否发生溢出

func IntToString

func IntToString(value int) string

IntToString 将int类型转换为string类型

func IntToUint

func IntToUint(value int) (uint, error)

IntToUint 将int类型转换为uint类型,检查是否为负数

func IntToUint16

func IntToUint16(value int) (uint16, error)

IntToUint16 将int类型转换为uint16类型,检查是否为负数或溢出

func IntToUint32

func IntToUint32(value int) (uint32, error)

IntToUint32 将int类型转换为uint32类型,检查是否为负数或溢出

func IntToUint64

func IntToUint64(value int) (uint64, error)

IntToUint64 将int类型转换为uint64类型,检查是否为负数

func IntToUint8

func IntToUint8(value int) (uint8, error)

IntToUint8 将int类型转换为uint8类型,检查是否为负数或溢出

func SliceToSlice added in v0.8.13

func SliceToSlice(src any, dst any) error

SliceToSlice 封装了对 slice 的转换。它接收 src 作为任意类型的切片, 并将其元素转换为 dst 指向的切片类型的元素。

func StringToBool

func StringToBool(value string) (bool, error)

StringToBool 将字符串转换为 bool 类型。

func StringToFloat32

func StringToFloat32(value string) (float32, error)

StringToFloat32 将字符串转换为 float32 类型。

func StringToFloat64

func StringToFloat64(value string) (float64, error)

StringToFloat64 将字符串转换为 float64 类型。

func StringToInt

func StringToInt(value string) (int, error)

StringToInt 将字符串转换为 int 类型。

func StringToInt16

func StringToInt16(value string) (int16, error)

StringToInt16 将字符串转换为 int16 类型。

func StringToInt32

func StringToInt32(value string) (int32, error)

StringToInt32 将字符串转换为 int32 类型。

func StringToInt64

func StringToInt64(value string) (int64, error)

StringToInt64 将字符串转换为 int64 类型。

func StringToInt8

func StringToInt8(value string) (int8, error)

StringToInt8 将字符串转换为 int8 类型。

func StringToUint

func StringToUint(value string) (uint, error)

StringToUint 将字符串转换为 uint 类型。

func StringToUint16

func StringToUint16(value string) (uint16, error)

StringToUint16 将字符串转换为 uint16 类型。

func StringToUint32

func StringToUint32(value string) (uint32, error)

StringToUint32 将字符串转换为 uint32 类型。

func StringToUint64

func StringToUint64(value string) (uint64, error)

StringToUint64 将字符串转换为 uint64 类型。

func StringToUint8

func StringToUint8(value string) (uint8, error)

StringToUint8 将字符串转换为 uint8 类型。

func StructSliceToStructSlice added in v0.8.10

func StructSliceToStructSlice[T any](src any, fieldMap map[string]string) ([]T, error)

func StructToMap

func StructToMap(s interface{}) (map[string]string, error)

StructToMap 将结构体转换为map[string]string 使用json标签作为键名,如果无json标签则使用字段名 如果结构体中有嵌套结构体,会将嵌套结构体的字段展平

func StructToStruct added in v0.8.8

func StructToStruct[T any](src any, fieldMap map[string]string) (T, error)

StructToStruct 是一个万能转换函数,它可以将一个结构体转换为另一个结构体

func Uint16ToBool

func Uint16ToBool(value uint16) bool

Uint16ToBool 将uint16类型的值转换为bool类型,非零值转换为true,零值转换为false。

func Uint16ToFloat32

func Uint16ToFloat32(value uint16) (float32, error)

Uint16ToFloat32 将uint16类型的值转换为float32类型,不进行溢出检查。

func Uint16ToFloat64

func Uint16ToFloat64(value uint16) (float64, error)

Uint16ToFloat64 将uint16类型的值转换为float64类型,不进行溢出检查。

func Uint16ToInt

func Uint16ToInt(value uint16) (int, error)

Uint16ToInt 将uint16类型的值转换为int类型,不进行溢出检查。

func Uint16ToInt16

func Uint16ToInt16(value uint16) (int16, error)

Uint16ToInt16 将uint16类型的值转换为int16类型,不进行溢出检查。

func Uint16ToInt32

func Uint16ToInt32(value uint16) (int32, error)

Uint16ToInt32 将uint16类型的值转换为int32类型,不进行溢出检查。

func Uint16ToInt64

func Uint16ToInt64(value uint16) (int64, error)

Uint16ToInt64 将uint16类型的值转换为int64类型,不进行溢出检查。

func Uint16ToInt8

func Uint16ToInt8(value uint16) (int8, error)

Uint16ToInt8 将uint16类型的值转换为int8类型,如果超出int8范围则返回错误。

func Uint16ToString

func Uint16ToString(value uint16) string

Uint16ToString 将uint16类型的值转换为字符串类型。

func Uint16ToUint

func Uint16ToUint(value uint16) (uint, error)

Uint16ToUint 将uint16类型的值转换为uint类型,不进行溢出检查。

func Uint16ToUint32

func Uint16ToUint32(value uint16) (uint32, error)

Uint16ToUint32 将uint16类型的值转换为uint32类型,不进行溢出检查。

func Uint16ToUint64

func Uint16ToUint64(value uint16) (uint64, error)

Uint16ToUint64 将uint16类型的值转换为uint64类型,不进行溢出检查。

func Uint16ToUint8

func Uint16ToUint8(value uint16) (uint8, error)

Uint16ToUint8 将uint16类型的值转换为uint8类型,如果超出uint8范围则返回错误。

func Uint32ToBool

func Uint32ToBool(value uint32) bool

Uint32ToBool 将uint32类型的值转换为bool类型,非零值转换为true,零值转换为false。

func Uint32ToFloat32

func Uint32ToFloat32(value uint32) (float32, error)

Uint32ToFloat32 将uint32类型的值转换为float32类型,不进行溢出检查。

func Uint32ToFloat64

func Uint32ToFloat64(value uint32) (float64, error)

Uint32ToFloat64 将uint32类型的值转换为float64类型,不进行溢出检查。

func Uint32ToInt

func Uint32ToInt(value uint32) (int, error)

Uint32ToInt 将uint32类型的值转换为int类型,不进行溢出检查。

func Uint32ToInt16

func Uint32ToInt16(value uint32) (int16, error)

Uint32ToInt16 将uint32类型的值转换为int16类型,如果超出int16范围则返回错误。

func Uint32ToInt32

func Uint32ToInt32(value uint32) (int32, error)

Uint32ToInt32 将uint32类型的值转换为int32类型,如果超出int32范围则返回错误。

func Uint32ToInt64

func Uint32ToInt64(value uint32) (int64, error)

Uint32ToInt64 将uint32类型的值转换为int64类型,不进行溢出检查。

func Uint32ToInt8

func Uint32ToInt8(value uint32) (int8, error)

Uint32ToInt8 将uint32类型的值转换为int8类型,如果超出int8范围则返回错误。

func Uint32ToString

func Uint32ToString(value uint32) string

Uint32ToString 将uint32类型的值转换为字符串类型。

func Uint32ToUint

func Uint32ToUint(value uint32) (uint, error)

Uint32ToUint 将uint32类型的值转换为uint类型,不进行溢出检查。

func Uint32ToUint16

func Uint32ToUint16(value uint32) (uint16, error)

Uint32ToUint16 将uint32类型的值转换为uint16类型,如果超出uint16范围则返回错误。

func Uint32ToUint64

func Uint32ToUint64(value uint32) (uint64, error)

Uint32ToUint64 将uint32类型的值转换为uint64类型,不进行溢出检查。

func Uint32ToUint8

func Uint32ToUint8(value uint32) (uint8, error)

Uint32ToUint8 将uint32类型的值转换为uint8类型,如果超出uint8范围则返回错误。

func Uint64ToBool

func Uint64ToBool(value uint64) bool

Uint64ToBool 将uint64类型的值转换为bool类型,非零值转换为true,零值转换为false。

func Uint64ToFloat32

func Uint64ToFloat32(value uint64) (float32, error)

Uint64ToFloat32 将uint64类型的值转换为float32类型,不进行溢出检查。

func Uint64ToFloat64

func Uint64ToFloat64(value uint64) (float64, error)

Uint64ToFloat64 将uint64类型的值转换为float64类型,不进行溢出检查。

func Uint64ToInt

func Uint64ToInt(value uint64) (int, error)

Uint64ToInt 将uint64类型的值转换为int类型,如果超出int范围则返回错误。

func Uint64ToInt16

func Uint64ToInt16(value uint64) (int16, error)

Uint64ToInt16 将uint64类型的值转换为int16类型,如果超出int16范围则返回错误。

func Uint64ToInt32

func Uint64ToInt32(value uint64) (int32, error)

Uint64ToInt32 将uint64类型的值转换为int32类型,如果超出int32范围则返回错误。

func Uint64ToInt64

func Uint64ToInt64(value uint64) (int64, error)

Uint64ToInt64 将uint64类型的值转换为int64类型,如果超出int64范围则返回错误。

func Uint64ToInt8

func Uint64ToInt8(value uint64) (int8, error)

Uint64ToInt8 将uint64类型的值转换为int8类型,如果超出int8范围则返回错误。

func Uint64ToString

func Uint64ToString(value uint64) string

Uint64ToString 将uint64类型的值转换为字符串类型。

func Uint64ToUint

func Uint64ToUint(value uint64) (uint, error)

Uint64ToUint 将uint64类型的值转换为uint类型,如果超出uint范围则返回错误。

func Uint64ToUint16

func Uint64ToUint16(value uint64) (uint16, error)

Uint64ToUint16 将uint64类型的值转换为uint16类型,如果超出uint16范围则返回错误。

func Uint64ToUint32

func Uint64ToUint32(value uint64) (uint32, error)

Uint64ToUint32 将uint64类型的值转换为uint32类型,如果超出uint32范围则返回错误。

func Uint64ToUint8

func Uint64ToUint8(value uint64) (uint8, error)

Uint64ToUint8 将uint64类型的值转换为uint8类型,如果超出uint8范围则返回错误。

func Uint8ToBool

func Uint8ToBool(value uint8) bool

Uint8ToBool 将uint8类型的值转换为bool类型,非零值转换为true,零值转换为false。

func Uint8ToFloat32

func Uint8ToFloat32(value uint8) (float32, error)

Uint8ToFloat32 将uint8类型的值转换为float32类型,不进行溢出检查。

func Uint8ToFloat64

func Uint8ToFloat64(value uint8) (float64, error)

Uint8ToFloat64 将uint8类型的值转换为float64类型,不进行溢出检查。

func Uint8ToInt

func Uint8ToInt(value uint8) (int, error)

Uint8ToInt 将uint8类型的值转换为int类型,不进行溢出检查。

func Uint8ToInt16

func Uint8ToInt16(value uint8) (int16, error)

Uint8ToInt16 将uint8类型的值转换为int16类型,不进行溢出检查。

func Uint8ToInt32

func Uint8ToInt32(value uint8) (int32, error)

Uint8ToInt32 将uint8类型的值转换为int32类型,不进行溢出检查。

func Uint8ToInt64

func Uint8ToInt64(value uint8) (int64, error)

Uint8ToInt64 将uint8类型的值转换为int64类型,不进行溢出检查。

func Uint8ToInt8

func Uint8ToInt8(value uint8) (int8, error)

Uint8ToInt8 将uint8类型的值转换为int8类型,如果超出int8范围则返回错误。

func Uint8ToString

func Uint8ToString(value uint8) string

Uint8ToString 将uint8类型的值转换为字符串类型。

func Uint8ToUint

func Uint8ToUint(value uint8) (uint, error)

Uint8ToUint 将uint8类型的值转换为uint类型,不进行溢出检查。

func Uint8ToUint16

func Uint8ToUint16(value uint8) (uint16, error)

Uint8ToUint16 将uint8类型的值转换为uint16类型,不进行溢出检查。

func Uint8ToUint32

func Uint8ToUint32(value uint8) (uint32, error)

Uint8ToUint32 将uint8类型的值转换为uint32类型,不进行溢出检查。

func Uint8ToUint64

func Uint8ToUint64(value uint8) (uint64, error)

Uint8ToUint64 将uint8类型的值转换为uint64类型,不进行溢出检查。

func UintToBool

func UintToBool(value uint) bool

UintToBool 将uint类型的值转换为bool类型,非零值转换为true,零值转换为false。

func UintToFloat32

func UintToFloat32(value uint) (float32, error)

UintToFloat32 将uint类型的值转换为float32类型,不进行溢出检查。

func UintToFloat64

func UintToFloat64(value uint) (float64, error)

UintToFloat64 将uint类型的值转换为float64类型,不进行溢出检查。

func UintToInt

func UintToInt(value uint) (int, error)

UintToInt 将uint类型的值转换为int类型,如果超出int范围则返回错误。

func UintToInt16

func UintToInt16(value uint) (int16, error)

UintToInt16 将uint类型的值转换为int16类型,如果超出int16范围则返回错误。

func UintToInt32

func UintToInt32(value uint) (int32, error)

UintToInt32 将uint类型的值转换为int32类型,如果超出int32范围则返回错误。

func UintToInt64

func UintToInt64(value uint) (int64, error)

UintToInt64 将uint类型的值转换为int64类型,如果超出int64范围则返回错误。

func UintToInt8

func UintToInt8(value uint) (int8, error)

UintToInt8 将uint类型的值转换为int8类型,如果超出int8范围则返回错误。

func UintToString

func UintToString(value uint) string

UintToString 将uint类型的值转换为字符串类型。

func UintToUint16

func UintToUint16(value uint) (uint16, error)

UintToUint16 将uint类型的值转换为uint16类型,如果超出uint16范围则返回错误。

func UintToUint32

func UintToUint32(value uint) (uint32, error)

UintToUint32 将uint类型的值转换为uint32类型,如果超出uint32范围则返回错误。

func UintToUint64

func UintToUint64(value uint) (uint64, error)

UintToUint64 将uint类型的值转换为uint64类型,不进行溢出检查。

func UintToUint8

func UintToUint8(value uint) (uint8, error)

UintToUint8 将uint类型的值转换为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