conv

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(any interface{}) bool

Bool converts `any` to bool.<将“any”转换为bool。>

func Byte

func Byte(any interface{}) byte

Byte converts `any` to byte.<将“any”转换为byte。>

func Bytes

func Bytes(any interface{}) []byte

Bytes converts `any` to []byte.<将“any”转换为[]byte。>

func BytesToStruct

func BytesToStruct(data []byte, to interface{}) error

BytesToStruct Using gob encoding is generally used for "similar" two structure transmission binding or RPC communication

func Float32

func Float32(any interface{}) float32

Float32 converts `any` to float32.<将“any”转换为float32。>

func Float64

func Float64(any interface{}) float64

Float64 converts `any` to float64.<将“any”转换为float64。>

func Indirect

func Indirect(v reflect.Value) reflect.Value

Indirect returns last value that v points to

func Int

func Int(any interface{}) int

Int converts "any" to int.<将“any”转换为int。>

func Int16

func Int16(any interface{}) int16

Int16 converts "any" to int16.<将“any”转换为int16。>

func Int32

func Int32(any interface{}) int32

Int32 converts "any" to int32.<将“any”转换为int32。>

func Int64

func Int64(any interface{}) int64

Int64 converts "any" to int64.<将“any”转换为int64。>

func Int8

func Int8(any interface{}) int8

Int8 converts "any" to int8.<将“any”转换为int8。>

func InterfaceToStruct

func InterfaceToStruct(data interface{}) interface{}

InterfaceToStruct interface conversion Struct

func Interfaces

func Interfaces(any interface{}) []interface{}

Interfaces converts `any` to []interface{}.<将“any”转换为[]interface{}。>

func Ints

func Ints(any interface{}) []int

Ints 将 `any` 转换为 []int。

func Map

func Map(any interface{}) map[string]interface{}

Map converts `any` to map[string]interface{}.<将“any”转换为map[string]interface{}。>

func MapInt

func MapInt(any interface{}) map[int]interface{}

MapInt converts `any` to map[int]interface{}.<将“any”map[int]interface{}。>

func MapString

func MapString(any interface{}) map[string]string

MapString converts `any` to map[string]string.<将“any”转换为map[string]string。>

func Maps added in v1.4.7

func Maps(any interface{}) []map[string]interface{}

Maps converts `any` to []map[string]interface{}.<将“any”转换为[]map[string]interface{}。>

func Rune

func Rune(any interface{}) rune

Rune converts `any` to rune.<将“any”转换为rune。>

func Runes

func Runes(any interface{}) []rune

Runes converts `any` to []rune.<将“any”转换为[]rune。>

func String

func String(any interface{}) string

String converts `any` to string.<将“any”转换为string。>

func Strings

func Strings(any interface{}) []string

Strings 将 `any` 转换为 []string。

func Struct

func Struct(model interface{}, data interface{})

Struct conversion binding model Bound model data Data

func StructToBytes

func StructToBytes(data interface{}) []byte

StructToBytes Use gob encoding generally used for "similar" two structure transmission binding or RPC communication

func Uint

func Uint(any interface{}) uint

Uint converts "any" to uint.<将“any”转换为uint。>

func Uint16

func Uint16(any interface{}) uint16

Uint16 converts "any" to uint16.<将“any”转换为uint16。>

func Uint32

func Uint32(any interface{}) uint32

Uint32 converts "any" to uint32.<将“any”转换为uint32。>

func Uint64

func Uint64(any interface{}) uint64

Uint64 converts "any" to uint64.<将“any”转换为uint64。>

func Uint8

func Uint8(any interface{}) uint8

Uint8 converts "any" to uint8.<将“any”转换为uint8。>

Types

This section is empty.

Jump to

Keyboard shortcuts

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