cast

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const UTC = "UTC"

Variables

This section is empty.

Functions

func ToBigFloat

func ToBigFloat(i any) *big.Float

ToBigFloat casts an interface to a *big.Float type.

func ToBigFloatE

func ToBigFloatE(a any) (*big.Float, error)

ToBigFloatE casts an interface to a *big.Float type.

func ToBigInt

func ToBigInt(i any) *big.Int

ToBigInt casts an interface to a *big.Int type.

func ToBigIntE

func ToBigIntE(a any) (*big.Int, error)

ToBigIntE casts an interface to a *big.Int type.

func ToBigRat

func ToBigRat(i any) *big.Rat

ToBigRat casts an interface to a *big.Rat type.

func ToBigRatE

func ToBigRatE(a any) (*big.Rat, error)

ToBigRatE casts an interface to a *big.Rat type.

func ToBool

func ToBool(i any) bool

ToBool casts an interface to a bool type.

func ToBoolE

func ToBoolE(a any) (bool, error)

ToBoolE casts an interface to a bool type.

func ToBytes

func ToBytes(a any) []byte

ToBytes casts an interface to a []byte type.

func ToBytesE

func ToBytesE(a any) ([]byte, error)

ToBytesE casts an interface to a []byte type.

func ToComplex128

func ToComplex128(i any) complex128

ToComplex128 casts an interface to a complex128 type.

func ToComplex128E

func ToComplex128E(a any) (complex128, error)

ToComplex128E casts an interface to a complex128 type.

func ToComplex64

func ToComplex64(i any) complex64

ToComplex64 casts an interface to a complex64 type.

func ToComplex64E

func ToComplex64E(a any) (complex64, error)

ToComplex64E casts an interface to a complex64 type.

func ToDuration

func ToDuration(a any) time.Duration

func ToDurationE

func ToDurationE(a any) (time.Duration, error)

func ToError

func ToError(a any) error

ToError casts an interface to an error type.

func ToErrorE

func ToErrorE(a any) (error, error)

ToErrorE casts an interface to an error type.

func ToFloat32

func ToFloat32(i any) float32

ToFloat32 casts an interface to a float32 type.

func ToFloat32E

func ToFloat32E(a any) (float32, error)

ToFloat32E casts an interface to a float32 type.

func ToFloat64

func ToFloat64(i any) float64

ToFloat64 casts an interface to a float64 type.

func ToFloat64E

func ToFloat64E(a any) (float64, error)

ToFloat64E 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 ToInt16E

func ToInt16E(a any) (int16, error)

ToInt16E casts an interface to an int16 type.

func ToInt32

func ToInt32(i any) int32

ToInt32 casts an interface to an int32 type.

func ToInt32E

func ToInt32E(a any) (int32, error)

ToInt32E casts an interface to an int32 type.

func ToInt64

func ToInt64(i any) int64

ToInt64 casts an interface to an int64 type.

func ToInt64E

func ToInt64E(a any) (int64, error)

ToInt64E casts an interface to an int64 type.

func ToInt8

func ToInt8(i any) int8

ToInt8 casts an interface to an int8 type.

func ToInt8E

func ToInt8E(a any) (int8, error)

ToInt8E casts an interface to an int8 type.

func ToIntE

func ToIntE(a any) (int, error)

ToIntE casts an interface to an int type.

func ToString

func ToString(a any) string

ToString casts an interface to a string type.

func ToStringE

func ToStringE(a any) (string, error)

ToStringE casts an interface to a string type.

func ToStringer

func ToStringer(a any) fmt.Stringer

ToStringer casts an interface to a fmt.Stringer type.

func ToStringerE

func ToStringerE(a any) (fmt.Stringer, error)

ToStringerE casts an interface to a fmt.Stringer type.

func ToTimeZone

func ToTimeZone(a any) *time.Location

func ToTimeZoneE

func ToTimeZoneE(a any) (*time.Location, error)

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 ToUint16E

func ToUint16E(a any) (uint16, error)

ToUint16E casts an interface to a uint16 type.

func ToUint32

func ToUint32(i any) uint32

ToUint32 casts an interface to a uint32 type.

func ToUint32E

func ToUint32E(a any) (uint32, error)

ToUint32E casts an interface to a uint32 type.

func ToUint64

func ToUint64(i any) uint64

ToUint64 casts an interface to a uint64 type.

func ToUint64E

func ToUint64E(a any) (uint64, error)

ToUint64E casts an interface to a uint64 type.

func ToUint8

func ToUint8(i any) uint8

ToUint8 casts an interface to a uint8 type.

func ToUint8E

func ToUint8E(a any) (uint8, error)

ToUint8E casts an interface to a uint type.

func ToUintE

func ToUintE(a any) (uint, error)

ToUintE casts an interface to a uint type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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