copier

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package copier provides utility that copy element between structs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(toValue interface{}, fromValue interface{}, opts ...func(*Config)) (err error)

Copy copy things from source to destination

func CopyMap added in v1.3.0

func CopyMap(dst, src map[string]interface{}, opts ...func(*Config))

func IgnoreEmptyValue added in v1.1.1

func IgnoreEmptyValue(config *Config)

IgnoreEmptyValue option to config IgnoreEmptyValue, any empty or nil value will not copy from source to destination

Types

type Config added in v1.1.1

type Config struct {
	IgnoreEmptyValue bool
}

Config configurations for Copy function

Jump to

Keyboard shortcuts

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