Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not create deep copy #110

Open
debasish-mihup opened this issue Aug 22, 2021 · 2 comments
Open

Does not create deep copy #110

debasish-mihup opened this issue Aug 22, 2021 · 2 comments
Assignees

Comments

@debasish-mihup
Copy link

https://play.golang.org/p/IYQlesIxpD1

Trying to deep copy a slice of struct but it is not working as all the copies are pointing to original and thus changing the copy affects the original

@bAngerman
Copy link

The fields of the struct must be exported in order to copy them.

see https://go.dev/play/p/q_eCLQqfUXE

@Rmaan
Copy link

Rmaan commented Nov 2, 2023

This should be written in big letters in the readme 😂, it makes this library less useful as a usual use case is to copy structs from other packages with unexported fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants