An external sort function for Go.