deepcopy icon indicating copy to clipboard operation
deepcopy copied to clipboard

Deep copy things

Results 10 deepcopy issues
Sort by recently updated
recently updated
newest added

Hello! Somehow Copy function cannot deepcopy an array of list of list. A example test is following. ``` package deepcopytest import ( "testing" "github.com/mohae/deepcopy" ) type a [3][][]float64 var source...

When I call deepcopy method, i am facing issue. ===================METHOD================== response.BdtReqData = deepcopy.Copy(&request).(*models.BdtReqData) =====================BdtReqData======================== package models type BdtReqData struct { AspId string `json:"aspId" yaml:"aspId" bson:"aspId" mapstructure:"AspId"` DesTimeInt *TimeWindow `json:"desTimeInt" yaml:"desTimeInt"...

your code can't copy error varible.

Just found this repo. @mohae are you still maintaining this? - add support for go module? - release a versioned tag?

Introduced basic struct tags support. - Use tag `deepcopy:"-"` to skip copying of a struct field (will be zero-valued); - Use tag `deepcopy:"="` to assign the field, it is specifically...

They should be deep copied using proto.Clone which uses protoreflect under the hood. https://blog.golang.org/protobuf-apiv2