mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-12 06:11:03 -04:00
11 lines
213 B
Go
11 lines
213 B
Go
package clone
|
|
|
|
// SliceOfString deep copy a slice of strings
|
|
func SliceOfString(source []string) []string {
|
|
if source == nil {
|
|
return nil
|
|
}
|
|
res := make([]string, len(source))
|
|
copy(res, source)
|
|
return res
|
|
}
|