Documentation
¶
Index ¶
- func FirstOfType[T any](values []reflect.Value) (T, bool)
- func GetConcreteElement(v reflect.Value) reflect.Value
- func GetConcreteValue(v reflect.Value) any
- func GetField(v reflect.Value, fieldExpr string) (reflect.Value, error)
- func GetTypedField[T any](v reflect.Value, fieldExpr string) (T, bool)
- func GetTypedValue[T any](v any) (T, bool)
- func IsNotConcrete(v reflect.Value) bool
- func LastOfType[T any](values []reflect.Value) (T, bool)
- func TracePath(v reflect.Value, fieldExpr string) ([]reflect.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstOfType ¶
FirstOfType returns the first value in the slice that matches the specified type. If no matching value is found, it returns the zero value of the type and false.
func GetConcreteElement ¶
GetConcreteElement returns the concrete reflect.Value of a reflect.Value when it is a pointer or interface or the same reflect.Value when it is already concrete.
func GetConcreteValue ¶
GetConcreteValue returns the concrete value of a reflect.Value.
This function is used to get the concrete value of a reflect.Value even if it is a pointer or interface. Concrete values are values that are not pointers or interfaces (including maps, slices, structs, etc.).
func GetTypedValue ¶
func IsNotConcrete ¶
IsNotConcrete returns true if the reflect.Value is a pointer or interface.
Types ¶
This section is empty.