cast

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToBoolE

func ToBoolE(s string) (bool, error)

func ToBoolOrDefault

func ToBoolOrDefault(s string, d bool) bool

func ToBoolSliceE

func ToBoolSliceE(s []string) ([]bool, error)

func ToByteSliceE

func ToByteSliceE(s string) ([]byte, error)

func ToByteSliceSliceE

func ToByteSliceSliceE(s []string) ([][]byte, error)

func ToErrorE

func ToErrorE(s string) (error, error)

func ToErrorSliceE

func ToErrorSliceE(s []string) ([]error, error)
Example
got, _ := ToErrorSliceE([]string{"test1", "test2"})
fmt.Println(got)
Output:

[test1 test2]

func ToFloat32E

func ToFloat32E(s string) (float32, error)

func ToFloat32SliceE

func ToFloat32SliceE(s []string) ([]float32, error)

func ToFloat64E

func ToFloat64E(s string) (float64, error)

func ToFloat64SliceE

func ToFloat64SliceE(s []string) ([]float64, error)

func ToInt

func ToInt(s string) int

func ToInt16E

func ToInt16E(s string) (int16, error)

func ToInt16SliceE

func ToInt16SliceE(s []string) ([]int16, error)

func ToInt32E

func ToInt32E(s string) (int32, error)

func ToInt32SliceE

func ToInt32SliceE(s []string) ([]int32, error)

func ToInt64E

func ToInt64E(s string) (int64, error)

func ToInt64SliceE

func ToInt64SliceE(s []string) ([]int64, error)

func ToInt8E

func ToInt8E(s string) (int8, error)

func ToInt8SliceE

func ToInt8SliceE(s []string) ([]int8, error)

func ToIntE

func ToIntE(s string) (int, error)

func ToIntOrDefault

func ToIntOrDefault(s string, d int) int

func ToIntSliceE

func ToIntSliceE(s []string) ([]int, error)

func ToInterfaceSliceE

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

func ToRuneSliceE

func ToRuneSliceE(s string) ([]rune, error)

func ToRuneSliceSliceE

func ToRuneSliceSliceE(s []string) ([][]rune, error)

func ToUint16E

func ToUint16E(s string) (uint16, error)

func ToUint16SliceE

func ToUint16SliceE(s []string) ([]uint16, error)

func ToUint32E

func ToUint32E(s string) (uint32, error)

func ToUint32SliceE

func ToUint32SliceE(s []string) ([]uint32, error)

func ToUint64E

func ToUint64E(s string) (uint64, error)

func ToUint64SliceE

func ToUint64SliceE(s []string) ([]uint64, error)

func ToUint8E

func ToUint8E(s string) (uint8, error)

func ToUint8SliceE

func ToUint8SliceE(s []string) ([]uint8, error)

func ToUintE

func ToUintE(s string) (uint, error)

func ToUintSliceE

func ToUintSliceE(s []string) ([]uint, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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