Sometimes you may want to limit deep copying from copying some leaf type.
Currently you CAN do so, this way:
Make your type implement the IDeepCopy interface, and do copying yourself, e.g. just copy
the pointer.
If your type is impossible to extend with methods, e.g. that's a library type, then:
Make a wrapper for your type.
Make the wrapper implement the IDeepCopy interface.
===
deepcopy makes deep copies of things. A standard copy will copy the
pointers: deep copy copies the values pointed to. Unexported field
values are not copied.
Copyright (c)2014-2016, Joel Scoble (github.com/mohae), all rights reserved.
License: MIT, for more details check the included LICENSE file.
Copy creates a deep copy of whatever is passed to it and returns the copy
in an interface{}. The returned value will need to be asserted to the
correct type.