hiboot: hidevops.io/hiboot/pkg/utils/copier Index | Files

package copier

import "hidevops.io/hiboot/pkg/utils/copier"

Package copier provides utility that copy element between structs


Package Files


func Copy Uses

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

Copy copy things from source to destination

func CopyMap Uses

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

func IgnoreEmptyValue Uses

func IgnoreEmptyValue(config *Config)

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

type Config Uses

type Config struct {
    IgnoreEmptyValue bool

Config configurations for Copy function

Package copier imports 5 packages (graph) and is imported by 4 packages. Updated 2019-09-20. Refresh now. Tools for package owners.