jinzhu / copier

Copier for golang, copy value from struct to struct and more
MIT License
5.58k stars 490 forks source link

allow item in source array equal to nil #32

Closed WingGao closed 5 years ago

WingGao commented 7 years ago
users := []*User{{Name: "Jinzhu", Age: 18, Role: "Admin", Notes: []string{"hello world"}}, nil}
employees := []Employee{}
copier.Copy(&employees, users) //no panic