Hacker News new | ask | show | jobs
by jstimpfle 2562 days ago
Can't you just do something like qsort()?
1 comments

Technically yes, however it is not type-safe. Idiomatic Go usually tries to be at least somewhat type-safe, and so the standard library's sort package uses interfaces instead of comparison functions. This is a bit more tedious to write unfortunately.