It sorts by name, but there is a big problem with golang string comparison. If you consider these two strings: str1 : "hello.20190305-102.txt" str2 : "hello.20190305-99.txt"
Then we should say that str1 > str2. But go returns str1 < str2 On Wednesday, August 19, 2015 at 3:10:41 PM UTC+5:30, Arie van Wingerden wrote: > > The docs say: ReadDir reads the directory named by dirname and returns a > list of sorted directory entries. > *It does not say sorted by what. * > Maybe a doc update would be nice. > TIA > > -- This message contains confidential information and is intended only for the individual to whom it is addressed. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and permanently delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, late or incomplete, or could contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version from the sender. Druva, www.druva.com <http://www.druva.com/> -- This message contains confidential information and is intended only for the individual to whom it is addressed. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and permanently delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, late or incomplete, or could contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version from the sender. Druva, www.druva.com <http://www.druva.com/> -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8276277d-4746-485a-9ac6-96bfa8dd42e3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.