copystruct

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 3 Imported by: 0

README

copystruct

不同结构体实例之间赋值

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyStruct

func CopyStruct(toVal interface{}, fromVal interface{}) (err error)

直接copy,结构体必须命名一致,不一致的忽略不copy

func CopyStructTag

func CopyStructTag(toValue interface{}, fromValue interface{}, tag string) (err error)

使用 Tag copy

func GetTag

func GetTag(field reflect.StructField, tag string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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