This commit is contained in:
Mike Schwörer 2023-05-24 21:42:10 +02:00
parent 0652bf22dc
commit cf9c73aa4a
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF

View File

@ -433,3 +433,10 @@ func ArrConcat[T any](arr ...[]T) []T {
}
return r
}
// ArrCopy does a shallow copy of the 'in' array
func ArrCopy[T any](in []T) []T {
out := make([]T, len(in))
copy(out, in)
return out
}