Skip to content
Snippets Groups Projects
Commit c6e824d4 authored by Jano Hendriks's avatar Jano Hendriks
Browse files

Add clone function

parent 6dda333c
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,10 @@ func DeepCopy(fromValue interface{}) (toValue interface{}) { ...@@ -38,6 +38,10 @@ func DeepCopy(fromValue interface{}) (toValue interface{}) {
return deepcopy.Copy(fromValue) return deepcopy.Copy(fromValue)
} }
func Clone[T any](fromValue T) (toValue T) {
return deepcopy.Copy(fromValue)
}
func ValueToPointer[V any](value V) *V { func ValueToPointer[V any](value V) *V {
return &value return &value
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment