ref

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendSliceBasicElem

func AppendSliceBasicElem(aSlice reflect.Value, value reflect.Value) reflect.Value

Help append slice with given basic element value

func AppendSliceBasicPtrElem

func AppendSliceBasicPtrElem(aSlice reflect.Value, value reflect.Value) reflect.Value

Help append slice with given basic pointer element value

func GetValue

func GetValue[T any](value reflect.Value) T

Get the exact value of given reflect.Value.

func IsNil

func IsNil(value any) bool

Identify whether the any type is nil.

func IsZero

func IsZero(value any) bool

Identify whether the any type is zero.

func NewIfEmpty

func NewIfEmpty[T any](value T) T

Make sure any type is created. Create by reflect if it is not there.

func Parse

func Parse(value any) (reflect.Type, reflect.Kind, reflect.Value)

func ReflectNew

func ReflectNew(value any) reflect.Value

Todo: Would complete this function in future.

func SetStructBasicField

func SetStructBasicField(field reflect.Value, value any)

Help set struct basic field by given value

func SetStructBasicPtrField

func SetStructBasicPtrField(field reflect.Value, value any)

Help set struct basic pointer field by given value

Types

This section is empty.

Jump to

Keyboard shortcuts

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