Documentation ¶
Index ¶
- func ArrayToSlice(reflectedArray reflect.Value) any
- func CopyReflectedType(reflectedValue reflect.Value) reflect.Value
- func GetField(field reflect.Value) any
- func GetReflectedArrayValues(reflectedArray reflect.Value) []any
- func SetField(field reflect.Value, value any)
- func SetReflectedArrayValues(reflectedArray reflect.Value, values []any) error
- func SliceToArray(reflectedSlice reflect.Value) any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayToSlice ¶
ArrayToSlice converts a reflected array into a slice. Returns the slice.
func CopyReflectedType ¶
CopyReflectedType creates a shallow copy of a reflected value. It supports slices, arrays, or structs. This method panics if an array, slice, or struct type is not provided. Returns the reflected copied value.
func GetReflectedArrayValues ¶
GetReflectedArrayValues obtains the values of each element of a reflected array or slice variable. This method panics if an array or slice type is not provided. Returns a slice containing all values of each element in the provided array or slice.
func SetReflectedArrayValues ¶
SetReflectedArrayValues takes an array or slice of the same length as the values provided, and sets each element to the corresponding element of the values provided. Returns an error if one occurred during value setting.
func SliceToArray ¶
SliceToArray converts a reflected slice into an array of the same size. Returns the array.
Types ¶
This section is empty.