What is this entire subthread even about? os.(File).Readdir does not, by default, even compile. The caller has to provide a parameter of how many entries to read at a time, and reading "all of them" is an intentional choice.
Ah. Perhaps the issue was ReadDirFS.ReadDir and GlobFS.Glob proposals, both of which are one-shot. I don't write much Go so missed that both os.ReadDir and ReadDirFile.ReadDir support streaming.