Skip to content

copier-v0.4.8

Choose a tag to compare

@civet148 civet148 released this 14 Apr 04:01
· 6 commits to master since this release

1. 修复copy结构体指针对象切片不能正确拷贝问题

2. 自动为取指针地址对象分配内存

type User struct {
     Id  uint64 
     Name string 
  }
  
  var to *User
  var from = &User{
        Id: 100,
       Name: "joy",
  }
  
  _ = copier.Copy(&to, from) // to是空指针,传入指针地址自动分配对象内存