go copy to array code example Example: go copy to array b = make([]int, len(a)) copy(b, a) // or b = append([]int(nil), a...)