I am fairly new to Golang, although I have already written some lines of code. I was exploring the sorting options when I found this(src):
func (p StringSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
I have no clue what is it going on there. Could someone explain to me what p[i], p[j] = p[j], p[i]
is doing?
Thanks.