convert

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 8 Imported by: 11

Documentation

Index

Constants

View Source
const MaxInt = int64(int(^uint(0) >> 1))

MaxInt defines the maximum size of an int.

View Source
const MaxUint = uint64(^uint(0))

MaxUint defines the maximum size of a uint.

View Source
const MinInt = -MaxInt - 1

MinInt defines the minimum size of an int.

Variables

This section is empty.

Functions

func ToBool

func ToBool(obj interface{}) (val bool, err error)

ToBool attempts to return the object as a bool.

func ToFloat64

func ToFloat64(obj interface{}) (val float64, err error)

ToFloat64 attempts to return the object as a float64.

func ToInt

func ToInt(obj interface{}) (val int, err error)

ToInt attempts to return the object as an int.

func ToInt16

func ToInt16(obj interface{}) (val int16, err error)

ToInt16 attempts to return the object as an int16.

func ToInt32

func ToInt32(obj interface{}) (val int32, err error)

ToInt32 attempts to return the object as an int32.

func ToInt64

func ToInt64(obj interface{}) (val int64, err error)

ToInt64 attempts to return the object as an int64.

func ToInt8

func ToInt8(obj interface{}) (val int8, err error)

ToInt8 attempts to return the object as an int8.

func ToString

func ToString(obj interface{}) (str string, err error)

ToString returns the object as a string.

func ToUint

func ToUint(obj interface{}) (val uint, err error)

ToUint attempts to return the object as a uint.

func ToUint16

func ToUint16(obj interface{}) (val uint16, err error)

ToUint16 attempts to return the object as a uint16.

func ToUint32

func ToUint32(obj interface{}) (val uint32, err error)

ToUint32 attempts to return the object as a uint32.

func ToUint64

func ToUint64(obj interface{}) (val uint64, err error)

ToUint64 attempts to return the object as a uint64.

func ToUint8

func ToUint8(obj interface{}) (val uint8, err error)

ToUint8 attempts to return the object as a uint8.

func ToValue

func ToValue(obj interface{}) (val driver.Value, err error)

ToValue attempts to return the object as a driver.Value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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