Skip to content

能否支持结构体内嵌字段到切片的拷贝 #218

@luoshaofeng

Description

@luoshaofeng

Describe the feature

比如有结构体A和D

type A struct{
    C int
    D *D
}

type D struct{
    B int
    E int
}

有切片var as []A,var ds[]D,以类似copier.Copy(&ds,as)的方式,直接把A.D拷贝到ds切片中

Motivation

简化代码,不用遍历A切片

Related Issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions