icopier

package
v0.3.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCopyDestination = copier.ErrInvalidCopyDestination
	ErrInvalidCopyFrom        = copier.ErrInvalidCopyFrom
	ErrMapKeyNotMatch         = copier.ErrMapKeyNotMatch
	ErrNotSupported           = copier.ErrNotSupported
)

Functions

func Copy

func Copy(to interface{}, from interface{}) error

func CopyWithOption

func CopyWithOption(to, from interface{}, opt Option) error

Types

type Option

type Option struct {
	// setting this value to true will ignore copying zero values of all the fields, including bools, as well as a
	// struct having all it's fields set to their zero values respectively (see IsZero() in reflect/value.go)
	IgnoreEmpty bool
	DeepCopy    bool
}

Option sets copy options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL