clif icon indicating copy to clipboard operation
clif copied to clipboard

Numbered options sorting strangely with `Choose`

Open sandro opened this issue 8 years ago • 0 comments

When providing Choose a list of keys incrementing from 1-10, 10 becomes the second option in the choice list (instead of two). I believe this is the sort order used by sort.Strings. It'd be great if Choose handled integer keys better, or maybe didn't sort the map at all. Further, perhaps there could be another function like Choose that takes an array of strings and automatically prints incrementing numbers as the choice.

Thanks

sandro avatar Apr 13 '17 00:04 sandro