Open CorentinClabaut opened 1 year ago
Quickly, you can try https://github.com/jinzhu/copier
Looks good @trungdlp-wolffun I didn't know this package, it seems to handle a lot of use cases.
In any case, it feels like this simple helper function can still be useful in the package for simple cases.
It would be helpful to have a function like follows to simply create a deep copy of a slice.
func DeepCopy[T any](collection []T) []T
No need for map deep copy function as it can be done with
lo.Assign
passing only one map in.