Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignToField ¶
AssignToField sets a struct field specified by its name to a provided value encoded as a string. The function handles various data types including basic types (string, int, etc.), complex types (structs, slices, maps) and types implementing the encoding.TextUnmarshaler interface. The conversion from string to the appropriate type is performed based on the field's underlying type. JSON format is expected for complex types. This function supports setting both direct values and pointers to the values.
func FieldsToMetadata ¶
func FieldsToMetadata[T any]() *readonlymap.ReadOnlyMap[string, *FieldMetadata]
FieldsToMetadata returns a map of a structs field names to their respective metadata.
Types ¶
Click to show internal directories.
Click to hide internal directories.