vartype

package
v2.0.0-...-4b7107c Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generic

type Generic struct {
	// contains filtered or unexported fields
}

Generic - the Generic type structure for abstract work

func (*Generic) Get

func (o *Generic) Get(t reflect.Kind) (data any, err error)

Get - Get a current data value, enforcing a given type of t.

func (*Generic) GetAny

func (o *Generic) GetAny() (data any, err error)

GetAny - blindly return the data from the object. (error is always nil, but it exists for future use)

func (*Generic) GetBool

func (o *Generic) GetBool() (data bool, err error)

GetBool - Return a boolean value or type mismatch error

func (*Generic) GetFloat

func (o *Generic) GetFloat() (data float64, err error)

GetFloat - Return float64 value or typecheck error

func (*Generic) GetFloat32

func (o *Generic) GetFloat32() (data float32, err error)

GetFloat32 - return a float32 object or typecheck error

func (*Generic) GetFloat64

func (o *Generic) GetFloat64() (data float64, err error)

GetFloat64 - return float64 or typecheck error

func (*Generic) GetInt

func (o *Generic) GetInt() (data int, err error)

GetInt - return integer or typecheck error

func (*Generic) GetInt16

func (o *Generic) GetInt16() (data int16, err error)

GetInt16 - return integer or typecheck error

func (*Generic) GetInt32

func (o *Generic) GetInt32() (data int32, err error)

GetInt32 - return integer or typecheck error

func (*Generic) GetInt64

func (o *Generic) GetInt64() (data int64, err error)

GetInt64 - return integer or typecheck error

func (*Generic) GetInt8

func (o *Generic) GetInt8() (data int8, err error)

GetInt8 - return integer or typecheck error

func (*Generic) GetString

func (o *Generic) GetString() (data string, err error)

GetString - return the string data or typecheck error

func (*Generic) GetUint

func (o *Generic) GetUint() (data uint, err error)

GetUint - return unsigned integer or typecheck

func (*Generic) GetUint16

func (o *Generic) GetUint16() (data uint16, err error)

GetUint16 - return unsigned integer or typecheck

func (*Generic) GetUint32

func (o *Generic) GetUint32() (data uint32, err error)

GetUint32 - return unsigned integer or typecheck

func (*Generic) GetUint64

func (o *Generic) GetUint64() (data uint64, err error)

GetUint64 - return unsigned integer or typecheck

func (*Generic) GetUint8

func (o *Generic) GetUint8() (data uint8, err error)

GetUint8 - return unsigned integer or typecheck

func (*Generic) IsType

func (o *Generic) IsType(t reflect.Kind) bool

IsType - return boolean true if the current value is of type t

func (*Generic) Set

func (o *Generic) Set(d any)

Set - Set a value

func (*Generic) Type

func (o *Generic) Type() (t reflect.Kind)

Type - return the actual underlying type.

Jump to

Keyboard shortcuts

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