Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestCopier ¶
func TestCopier()
Types ¶
type Employee ¶
type Employee struct { // Tell copier.Copy to panic if this field is not copied. Name string `copier:"must"` // Tell copier.Copy to return an error if this field is not copied. Age int32 `copier:"must,nopanic"` // Tell copier.Copy to explicitly ignore copying this field. Salary int `copier:"-"` DoubleAge int32 EmployeId int64 `copier:"EmployeNum"` // specify field name SuperRole string }
Tags in the destination Struct provide instructions to copier.Copy to ignore or enforce copying and to panic or return an error if a field was not copied.
Click to show internal directories.
Click to hide internal directories.