cpy

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cpy

Package cpy

Package cpy

Package cpy

Package cpy

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(toObj interface{}, fromObj interface{}) error

All Copy everything from one to another

func ErrCopyFromObjectInvalid

func ErrCopyFromObjectInvalid() error

ErrCopyFromObjectInvalid Error: Copy from object is invalid

func ErrCopyToObjectUnaddressable

func ErrCopyToObjectUnaddressable() error

ErrCopyToObjectUnaddressable Error: Copy to object is unaddressable

func ErrTypeMapNotEqual

func ErrTypeMapNotEqual() error

ErrTypeMapNotEqual Error: Type of map is not equal

func Filter

func Filter(toObj interface{}, fromObj interface{}, filter FilterFn) error

Filter Copy everything data which filtration, used for array, slice and map

func Gist

func Gist() *impl

Gist Доступ к внутренним функциям

func Omit

func Omit(toObj interface{}, fromObj interface{}, fields ...string) error

Omit Copy everything from one to another, but skip listed fields. Use for struct only

func Select

func Select(toObj interface{}, fromObj interface{}, fields ...string) error

Select Copy only the selected fields. Use for struct only

Types

type FilterFn

type FilterFn func(key interface{}, object interface{}) (skip bool)

FilterFn Data Filtering Function. Return true for skip data

Jump to

Keyboard shortcuts

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