INNER CODE UNIT · Go
TestExactCaseMatching
jinzhu/copier · copier_case_insensitive_test.go:49
func TestExactCaseMatching(t *testing.T) {
type Source struct {
Name string
Age int
}
type Dest struct {
Name string
Age int
}
source := Source{Name: "John", Age: 30}
dest := &Dest{}
err := Copy(dest, &source)
if err != nil {
t.Fatalf("Copy failed: %v", err)
}