2 ms·
Go already has en entire namespace devoted to making things easier for "pretty common use cases:" ioutil. That's exactly where this version of Readdir belongs.
by boring_twenties 6y ago
Go already has en entire namespace devoted to making things easier for "pretty common use cases:" ioutil. That's exactly where this version of Readdir belongs.
Otherwise, you'd better be 110% sure of this:
> Even when you know that you're dealing with a small number of files, and performance isn't critical?
Because if you turn out to be wrong down the line, your only option is now to rewrite the whole thing in a less-stupid language. Might as well just save yourself the trouble and do that from the beginning.