cast

package module
v0.0.0-...-e342123 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(s string) (bool, error)

func Float32

func Float32(s string) (float32, error)

func Float64

func Float64(s string) (float64, error)

func FromString

func FromString(s string, targetType string) (any, error)

FromString casts a string value to the given type name.

func FromType

func FromType(s string, targetType reflect.Type) (any, error)

FromType casts a string value to the given reflected type.

func Int

func Int(s string) (int, error)

func Int8

func Int8(s string) (int8, error)

func Int16

func Int16(s string) (int16, error)

func Int32

func Int32(s string) (int32, error)

func Int64

func Int64(s string) (int64, error)

func Uint

func Uint(s string) (uint, error)

func Uint8

func Uint8(s string) (uint8, error)

func Uint16

func Uint16(s string) (uint16, error)

func Uint32

func Uint32(s string) (uint32, error)

func Uint64

func Uint64(s string) (uint64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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