cast

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int8Tobool

func Int8Tobool(i int8) bool

func TimeToInt64

func TimeToInt64(t *time.Time) int64

func ToBool

func ToBool(i any) bool

func ToBoolSlice

func ToBoolSlice(i any) []bool

ToBoolSlice casts an interface to a []bool type.

func ToDuration

func ToDuration(i any) time.Duration

ToDuration casts an interface to a time.Duration type.

func ToDurationSlice

func ToDurationSlice(i any) []time.Duration

ToDurationSlice casts an interface to a []time.Duration type.

func ToFloat32

func ToFloat32(i any) float32

ToFloat32 casts an interface to a float32 type.

func ToFloat64

func ToFloat64(i any) float64

ToFloat64 casts an interface to a float64 type.

func ToInt

func ToInt(i any) int

ToInt casts an interface to an int type.

func ToInt16

func ToInt16(i any) int16

ToInt16 casts an interface to an int16 type.

func ToInt32

func ToInt32(i any) int32

ToInt32 casts an interface to an int32 type.

func ToInt64

func ToInt64(i any) int64

func ToInt8

func ToInt8(i any) int8

ToInt8 casts an interface to an int8 type.

func ToIntSlice

func ToIntSlice(i any) []int

ToIntSlice casts an interface to a []int type.

func ToSlice

func ToSlice(i any) []any

ToSlice casts an interface to a []interface{} type.

func ToString

func ToString(i any) string

ToString casts an interface to a string type.

func ToStringMap

func ToStringMap(i any) map[string]any

ToStringMap casts an interface to a map[string]interface{} type.

func ToStringMapBool

func ToStringMapBool(i any) map[string]bool

ToStringMapBool casts an interface to a map[string]bool type.

func ToStringMapInt

func ToStringMapInt(i any) map[string]int

ToStringMapInt casts an interface to a map[string]int type.

func ToStringMapInt64

func ToStringMapInt64(i any) map[string]int64

ToStringMapInt64 casts an interface to a map[string]int64 type.

func ToStringMapString

func ToStringMapString(i any) map[string]string

ToStringMapString casts an interface to a map[string]string type.

func ToStringMapStringSlice

func ToStringMapStringSlice(i any) map[string][]string

ToStringMapStringSlice casts an interface to a map[string][]string type.

func ToStringSlice

func ToStringSlice(i any) []string

ToStringSlice casts an interface to a []string type.

func ToTime

func ToTime(i any) time.Time

ToTime casts an interface to a time.Time type.

func ToUint

func ToUint(i any) uint

ToUint casts an interface to a uint type.

func ToUint16

func ToUint16(i any) uint16

ToUint16 casts an interface to a uint16 type.

func ToUint32

func ToUint32(i any) uint32

ToUint32 casts an interface to a uint32 type.

func ToUint64

func ToUint64(i any) uint64

ToUint64 casts an interface to a uint64 type.

func ToUint8

func ToUint8(i any) uint8

ToUint8 casts an interface to a uint8 type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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