dynamic

package
v0.0.0-...-86833b7 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapVisitor

func MapVisitor[Type any](v any, handler VisitorFunc[Type])

func PropertyGet

func PropertyGet[Type any](val any, property string) (value Type, found bool)

func PropertyGetDefault

func PropertyGetDefault[Type any](val any, property string, def Type) (Type, bool)

func PropertyGetReflect

func PropertyGetReflect(valOf reflect.Value, property string) reflect.Value

func SliceVisitor

func SliceVisitor[Type any](v any, handler VisitorFunc[Type])

func StructVisitor

func StructVisitor[Type any](v any, handler VisitorFunc[Type])

func VisitReflectValue

func VisitReflectValue[Type any](value reflect.Value, handler VisitorFunc[Type])

Types

type Context

type Context struct {
	Property  string
	FieldData reflect.StructField
}

type VisitorFunc

type VisitorFunc[Type any] func(value Type, field reflect.StructField) (ret Type)

Jump to

Keyboard shortcuts

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