Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetParsedValueFromAttributes ¶
func SetParsedValueFromAttributes[T any](attrs map[string]attr.Value, key string, setter func(*T), parser func(string) (interface{}, error)) error
SetParsedValueFromAttributes sets a parsed value from the given attribute map if the key exists and is not null. It takes a map of attributes, a key to look for, a setter function to set the parsed value, and a parser function to convert the string value to the desired type. It returns an error if parsing fails.
func SetStringValueFromAttributes ¶
SetStringValueFromAttributes sets a string value from the given attribute map if the key exists and is not null. It takes a map of attributes, a key to look for, and a setter function that sets the value if found.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.