Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
func Copy(src, dst any, options ...CopyOption) error
Copy copies fields from src to dst with optional configuration. The dst parameter must be a pointer to a struct.
Types ¶
type CopyOption ¶ added in v0.18.0
CopyOption configures the copy behavior.
func WithCaseInsensitive ¶
func WithCaseInsensitive() CopyOption
WithCaseInsensitive enables case-insensitive field name matching.
func WithDeepCopy ¶
func WithDeepCopy() CopyOption
WithDeepCopy enables deep copying of nested structures.
func WithFieldNameMapping ¶
func WithFieldNameMapping(mappings ...FieldNameMapping) CopyOption
WithFieldNameMapping adds custom field name mappings.
func WithIgnoreEmpty ¶
func WithIgnoreEmpty() CopyOption
WithIgnoreEmpty skips copying fields with zero values.
func WithTypeConverters ¶
func WithTypeConverters(converters ...TypeConverter) CopyOption
WithTypeConverters adds custom type converters.
type FieldNameMapping ¶ added in v0.18.0
type FieldNameMapping = copier.FieldNameMapping
FieldNameMapping is an alias for copier.FieldNameMapping.
type Nullable ¶ added in v0.18.0
type Nullable[T any] interface { ValueOrZero() T Ptr() *T }
Nullable defines the interface for null wrapper types.
type TypeConverter ¶
type TypeConverter = copier.TypeConverter
TypeConverter is an alias for copier.TypeConverter.
Click to show internal directories.
Click to hide internal directories.