I have a question about go. Let's say I have a struct Foo and a function/method for Less. What is the quickest way to sort an array of Foo's?
Do I have to implement my own []Foo type with all three methods as described in the sort package?
Do I have to implement my own []Foo type with all three methods as described in the sort package?
That is one of the reasons go has a guiding design principle that interfaces should be as small as possible.