Skip to content

Question: Does it really deep copy? #27

@doppl-neal

Description

@doppl-neal

I have 2 structs (of different types), each of these structs have embedded structs. The embedded structs have the same property name, however, are different types.

My assumption is that deepcopier will copy the data of the embedded structs the same way it copies the data of the structs at the top level? Am I missing something?

type Struct1 struct {
ID string
Description string
NotificationDate string
CustomerSiteID *string
CustomerSite CustomerSiteEntity
ClientAssetID *string
ClientAsset ClientAssetEntity
}

type Struct2 struct {
ID
Description string json:"description"
NotificationDate string json:"notificationDate"
CustomerSiteID string json:"customerSiteId"
CustomerSite CustomerSiteModel json:"customerSite" -- this is empty ClientAssetID string json:"clientAssetId"ClientAsset ClientAssetModel json:"clientAsset" -- this is empty
}

I am just starting to use this library, I am wondering if I am doing something incorrect?

Thank You,
Neal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions