dup

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst interface{})

Copy copier封装

dst需要创建好的对象

value -> ptr

src 中 empty, dst中的ptr会赋值为empty. str="" -> *str="" (如果需要nil不能使用这个方法) FIXME : 不能解决 empty -> ptr 复制后 ptr为empty, copier新版本v0.1.0 使用 option 解决

func CopyIgnoreEmpty

func CopyIgnoreEmpty(src, dst interface{}) error

func CopyMap

func CopyMap(src, dst interface{})

func CopyWithFieldStr

func CopyWithFieldStr(src, dst interface{}, fs ...string) error

CopyWithFieldStr 拷贝指定的属性

func CopyWithOption

func CopyWithOption(src, dst interface{}, opt copier.Option) error

func Decode

func Decode(src interface{}, dst interface{}) error

func DecodeMap

func DecodeMap(data map[string]interface{}, out interface{}) error

func DecodeSpec

func DecodeSpec(data interface{}, out interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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