cast

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNegativeNotAllowed = errors.New("unable to cast negative value")
	ErrDataLost           = errors.New("data lost between type conversion")
	ErrNilValue           = errors.New("can not convert nil to types")
	ErrCannotConvert      = errors.New("can not convert value to given type")
	ErrUnsupportedFormat  = errors.New("unsupporte format")
	ErrOutOfRange         = strconv.ErrRange
)

Functions

func Number

func Number[V types.Scalar, T types.Scalar](v V) (T, error)

Number convert argument v to type T Bug: not working

func ToInt8

func ToInt8(v any) (int8, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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