> The sort package has addressed this concern.
How? Looking at the documentation, you still have to write at least three functions for each type you want to sort.
How? Looking at the documentation, you still have to write at least three functions for each type you want to sort.
sort.Slice(people, func(i, j int) bool { return people[i].Name < people[j].Name })