Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, the sort package requires you to define methods on the slice of what you want to sort. For instance, if you defined a struct S, you need to implement Less, Swap and Len on an alias type of []S (since you cannot implement methods on slice types).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: