Golang Sort By Slice
Oh man, so recently I learned Go has a sort.Slice method.
I used to implement the sort.Interface for slices, (like this), which greatly frustrated me, ’cause it’s so verbose.
Then I learned about sort.Slice!
So much better!
This isn’t really new, but I just wanted to share.