Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamedFields ¶
NamedFields takes a struct and sets all fields with the given names to their zero value. This is useful when you want to scrub a struct type from a package that you don't control.
This function is a no-op for non-struct types.
func TaggedFields ¶
func TaggedFields(src any)
TaggedFields takes a struct and recursively sets all fields annotated with a `scrub:"true"` struct tag to their zero value. This is useful when you control the struct definition.
This function is a no-op for non-struct types.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.