Documentation ¶
Index ¶
- func AppendIntoOrderedMap(orderedMap goOrderedMap, value any) error
- func GetOrderedMapElement(om goOrderedMap, k reflect.Value) (reflect.Value, bool, error)
- func MethodByName(v reflect.Value, name string) (reflect.Value, error)
- func OrderedMapElementType(om goOrderedMap) (reflect.Type, error)
- func OrderedMapKeyType(om goOrderedMap) (reflect.Type, error)
- func OrderedMapKeys(om goOrderedMap) ([]reflect.Value, error)
- func RangeOrderedMap(orderedMap goOrderedMap, visit func(k reflect.Value, v reflect.Value) bool) error
- func UnaryMethodArgType(t reflect.Type, methodName string) (reflect.Type, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIntoOrderedMap ¶
AppendIntoOrderedMap appends a populated value into the ordered map.
There must not exist an existing element with the same key.
func GetOrderedMapElement ¶ added in v0.29.2
GetOrderedMapElement calls the given ordered map's Get function given the key value.
- reflect.Value is the retrieved value at the key. - bool is whether the value exists. - error is whether an unexpected condition was detected.
func MethodByName ¶
MethodByName returns a valid method for the given value, or an error if the method is not valid for use.
func OrderedMapElementType ¶
OrderedMapElementType returns the list element type of the ordered map.
func OrderedMapKeyType ¶
OrderedMapKeyType returns the key type of the ordered map, which will be a struct type for a multi-keyed list.
func OrderedMapKeys ¶
OrderedMapKeys returns the keys of the ordered map in a slice analogous to reflect's Value.MapKeys() method although it returns an error.
func RangeOrderedMap ¶
func RangeOrderedMap(orderedMap goOrderedMap, visit func(k reflect.Value, v reflect.Value) bool) error
RangeOrderedMap calls a visitor function over each key-value pair in order.
The for loop break when either the visit function returns false or an error is encountered due to the ordered map not being well-formed.
Types ¶
This section is empty.