Closed trakhimenok closed 7 years ago
For unit testing/mock purpose I need to copy struct to an existing pointer instance.
For example I have:
func Get(key int, val interace{}) error { //... return nil }
In the mock I would like to do:
func Get(key int, val interace{}) error { deepcopy.CopyRecursive(someVal, val) return nil }
Any reasons to exclude copyRecursive() from exporting?
Sorry for the delayed response.
I hadn't really thought about making it exported.
If you wish to make a pull request exporting it, I'll be happy to accept it.
@mohae, thanks!
For unit testing/mock purpose I need to copy struct to an existing pointer instance.
For example I have:
In the mock I would like to do:
Any reasons to exclude copyRecursive() from exporting?