convert

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: GPL-3.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDestinationType = "invalid destination type, expected: '%s'"
	ErrParseIntFailed         = "cannot parse '%s', expected integer"
	ErrParseInt8Failed        = "cannot parse '%s', expected integer of 8 bits"
	ErrParseInt16Failed       = "cannot parse '%s', expected integer of 16 bits"
	ErrParseInt32Failed       = "cannot parse '%s', expected integer of 32 bits"
	ErrParseInt64Failed       = "cannot parse '%s', expected integer of 64 bits"
	ErrParseUintFailed        = "cannot parse '%s', expected unsigned integer"
	ErrParseUint8Failed       = "cannot parse '%s', expected unsigned integer of 8 bits"
	ErrParseUint16Failed      = "cannot parse '%s', expected unsigned integer of 16 bits"
	ErrParseUint32Failed      = "cannot parse '%s', expected unsigned integer of 32 bits"
	ErrParseUint64Failed      = "cannot parse '%s', expected unsigned integer of 64 bits"
	ErrParseFloat32Failed     = "cannot parse '%s', expected float of 32 bits"
	ErrParseFloat64Failed     = "cannot parse '%s', expected float of 64 bits"
	ErrParseBoolFailed        = "cannot parse '%s', expected boolean"
)

Functions

func ErrorArrayToStringArray

func ErrorArrayToStringArray(errorArray *[]error) *[]string

ErrorArrayToStringArray maps an array of errors to an array of strings

func ToBool added in v0.1.2

func ToBool(value string, dest interface{}) error

ToBool converts a string to a bool

func ToFloat32 added in v0.1.2

func ToFloat32(value string, dest interface{}) error

ToFloat32 converts a string to a float32

func ToFloat64 added in v0.1.2

func ToFloat64(value string, dest interface{}) error

ToFloat64 converts a string to a float64

func ToInt added in v0.1.2

func ToInt(value string, dest interface{}) error

ToInt converts a string to an int

func ToInt16 added in v0.1.2

func ToInt16(value string, dest interface{}) error

ToInt16 converts a string to an int16

func ToInt32 added in v0.1.2

func ToInt32(value string, dest interface{}) error

ToInt32 converts a string to an int32

func ToInt64 added in v0.1.2

func ToInt64(value string, dest interface{}) error

ToInt64 converts a string to an int64

func ToInt8 added in v0.1.2

func ToInt8(value string, dest interface{}) error

ToInt8 converts a string to an int8

func ToUint added in v0.1.2

func ToUint(value string, dest interface{}) error

ToUint converts a string to an uint

func ToUint16 added in v0.1.2

func ToUint16(value string, dest interface{}) error

ToUint16 converts a string to an uint16

func ToUint32 added in v0.1.2

func ToUint32(value string, dest interface{}) error

ToUint32 converts a string to an uint32

func ToUint64 added in v0.1.2

func ToUint64(value string, dest interface{}) error

ToUint64 converts a string to an uint64

func ToUint8 added in v0.1.2

func ToUint8(value string, dest interface{}) error

ToUint8 converts a string to an uint8

Types

This section is empty.

Jump to

Keyboard shortcuts

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