Just thought of one more way to do this which is neater - define functions on a simpler slice type:
https://play.golang.org/p/0YcxA-Ufs-
So your sorting becomes quite neat:
sort.SliceStable(changes,changes.byLines)
sort.SliceStable(changes,changes.byUser)
I think I might use it this way (haven't actually used this in a real app yet).