refutil

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Indirect

func Indirect(value interface{}) interface{}

Indirect will perform recursive indirection on the given value. It should never panic and will return a value unless indirection is impossible due to infinite recursion in cases like `type Element *Element`.

func IndirectVal

func IndirectVal(val reflect.Value) reflect.Value

IndirectVal is like Indirect but faster when the caller is using working with a reflect.Value.

func IsKindComplex

func IsKindComplex(k reflect.Kind) bool

IsKindComplex returns true if the given Kind is a complex value.

func IsKindFloat

func IsKindFloat(k reflect.Kind) bool

IsKindFloat returns true if the given Kind is a float value.

func IsKindInt

func IsKindInt(k reflect.Kind) bool

IsKindInt returns true if the given Kind is a int value.

func IsKindLength

func IsKindLength(k reflect.Kind) bool

IsKindLength will return true if the Kind has a length.

func IsKindNillable

func IsKindNillable(k reflect.Kind) bool

IsKindNillable will return true if the Kind is a chan, func, interface, map, pointer, or slice value, false otherwise.

func IsKindNumeric

func IsKindNumeric(k reflect.Kind) bool

IsKindNumeric returns true if the given Kind is a numeric value.

func IsKindUint

func IsKindUint(k reflect.Kind) bool

IsKindUint returns true if the given Kind is a uint value.

func Recover

func Recover(f func() error) (err error)

Recover will attempt to execute f, if f return a non-nil error it will be returned. If f panics this function will attempt to recover() and return a error instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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