That's the most compelling example you could come up with as someone who presumably writes Go?
Reversing a slice of T. Copy and pasting this:
for i := len(a)/2 - 1; i >= 0; i-- {
opp := len(a) - 1 - i
a[i], a[opp] = a[opp], a[i]
}
New: reverse(a)
Or generic versions of these: https://gobyexample.com/collection-functions