mirror of
https://github.com/nspcc-dev/neofs-api-go.git
synced 2026-03-01 04:28:56 +00:00
Add CopyTo method #77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @smallhive on GitHub (Sep 7, 2023).
Is your feature request related to a problem? Please describe.
In SDK we have task to add
CopyTomethod for some structures. The method makes a deep copy of the structure.SDK wraps many api-go structures inside it and modifies them directly. Sometimes we have such situation
or even such one
Object type is just a synonym for api-go type, but has a lot of methods. Making a deep copy of this type is possible. Although having such
CopyTomethod in the original api-go type would be very helpful.Fortunately for this type all internal fields are available via getters/setters and making CopyTo in SDK is just a question of time.
Describe the solution you'd like
Implement
CopyTomethod directly in api-go repo. Right now in SDK implemented deep copy for the next strcutures:github.com/nspcc-dev/neofs-api-go/v2/refs
github.com/nspcc-dev/neofs-api-go/v2/session
github.com/nspcc-dev/neofs-api-go/v2/object
github.com/nspcc-dev/neofs-api-go/v2/netmap
Additional context
SDK doesn't mind to share/give/move existing code from it to neo-go repo