On Wed, Mar 8, 2017 at 8:32 AM, Valentin Deleplace <delepl...@gmail.com> wrote:
> I did explain the expected result : "and I want to visit other cities in > alphabetical order" > Jan is correct; the characterization of a problem hinges on accurately describing what you expect and what happened instead. Terms such as "broken" and "does not work" are best avoided because others don't know what your definitions are for these in the given context. :-) That being said, your alphabetical order is returned as you intend if you adjust line 17 thusly: sort.Slice(itinerary[:], func(i, j int) bool { Cheers, David > > Le 8 mars 2017 2:16 PM, "Jan Mercl" <0xj...@gmail.com> a écrit : > >> On Wed, Mar 8, 2017 at 2:10 PM Val <delepl...@gmail.com> wrote: >> >> > What do you think? >> >> You should explain what you've expected to get instead of what you've >> got. Without that, I for one, cannot figure out what you see as broken and >> I have no idea why do you think it's not a good idea to sort a slice of a >> slice. After all, it's just a slice as any other. >> >> -- >> >> -j >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.