Open anandsunderraman opened 3 months ago
https://go.dev/play/p/xa2-zmGBrU9
Refer to the example above.
type Address struct { Street string City string } type Person struct { Name string Age int addr *Address }
If a struct has an unexported field and if it is a pointer then DeepCopy of this unexported pointer does not happen.
struct
DeepCopy
Reproducible Example
https://go.dev/play/p/xa2-zmGBrU9
Description
Refer to the example above.
If a
struct
has an unexported field and if it is a pointer thenDeepCopy
of this unexported pointer does not happen.