copyutil

package
v0.0.0-...-6b90055 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopyByGob

func DeepCopyByGob(src, dst interface{}) error

*

  • @StructComment: 利用gob进行深拷贝

func DeepCopyByJson

func DeepCopyByJson(src, dst any) error

*

  • @StructComment: 利用json进行深拷贝 obj,&objTo

func DeepCopyByJsonCamelOrCase

func DeepCopyByJsonCamelOrCase(src, dst any, useCamel bool) error

驼峰式json

func DeepCopyByReflect

func DeepCopyByReflect(src, dst interface{}) (err error)

*

  • @StructComment: 利用反射进行深拷贝 obj,&objTo

参数传递时,第src使用指针还是实例请自行斟酌,dst必须是指针,涉及的字段必须是对外的

Types

This section is empty.

Jump to

Keyboard shortcuts

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