Documentation
¶
Overview ¶
Package transform provides struct transformation utilities for mutating string fields recursively within structs. These utilities are commonly used inside [apivalidation.Normalizer] implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StructMulti ¶
StructMulti runs all given functions on the struct pointer sequentially.
func StructStringFunc ¶
StructStringFunc applies f to every string field in the struct recursively.
func StructToLower ¶
func StructToLower(v any)
StructToLower runs strings.ToLower on all string fields in the struct recursively.
func StructTrimSpace ¶
func StructTrimSpace(v any)
StructTrimSpace runs strings.TrimSpace on all string fields in the struct recursively, including nested structs, pointer fields, slices, and map values.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.