Versions in this module Expand all Collapse all v0 v0.2.0 Jul 3, 2026 Changes in this version + const Bool + const Float32 + const Float64 + const Int + const String + var ErrFieldNameTagStartNotUpperCase = errors.New("copy: field name tag must be start upper case") + var ErrInvalidCopyDestination = errors.New("copy: destination must be non-nil and addressable") + var ErrInvalidCopyFrom = errors.New("copy: from must be non-nil and addressable") + var ErrMapKeyNotMatch = errors.New("copy: map's key type doesn't match") + var ErrNotSupported = errors.New("copy: not supported") + func Copy(toValue interface{}, fromValue interface{}) (err error) + func CopyWithOption(toValue interface{}, fromValue interface{}, opts ...Opt) (err error) + type FieldNameMapping struct + DstType interface{} + Mapping map[string]string + SrcType interface{} + type Opt func(*Opts) + func WithCaseSensitive() Opt + func WithConverters(converters ...TypeConverter) Opt + func WithDeepCopy() Opt + func WithFieldNameMapping(fieldNameMapping ...FieldNameMapping) Opt + func WithIgnoreEmpty() Opt + type Opts struct + CaseSensitive bool + Converters []TypeConverter + DeepCopy bool + FieldNameMapping []FieldNameMapping + IgnoreEmpty bool + func DefaultOpts() *Opts + func (o *Opts) Configure(opts ...Opt) + type TypeConverter struct + DstType interface{} + Fn func(src interface{}) (dst interface{}, err error) + SrcType interface{}