There is probably something really simple I’m missing here but I can’t get my head around how reverse sorting works.
https://golang.org/pkg/sort/#example_Reverse
To sort a slice, I do:
sort.Sort(myslice)
But to sort in reverse I have to do:
sort.Sort(sort.Reverse(myslice))
From the docs, “Reverse returns the reverse order for data.” so shouldn’t sort.Reverse sort in reverse order and then sort.Sort put the slice back into normal order again? Instead if I just do sort.Reverse nothing appears to happen.