go common utils
go get github.com/lyf-coder/utils
import (
"github.com/lyf-coder/utils"
)
type People struct {
Name string
Age int
}
type Student struct {
Name string
Grade int
}
s := Student{}
s.Name = "jack"
s.Grade = 100
p := People{}
CopyStruct(s, &p) // s is src struct, p is target struct
p.Name == s.Name == "jack" // p.Name will be same as s.Name is jack