On Thu, Feb 18, 2021 at 4:02 PM Piotr Wieczorek <pwi...@gmail.com> wrote: > > I'm writing a type implementing ReadDirFile interface, and I have some doubts > how I should implement ReadDir method. > The comment says on one hand: "Subsequent calls on the same file will yield > further DirEntry values." and on the other "If n <= 0, ReadDir returns all > the DirEntry values from the directory // in a single slice.". > So what should be returned if user first calls dir.ReadDir(1) and next > dir.ReadDir(0)? > Should the second call return all the DirEntry values or only the further > ones?
It should only return the remaining ones. Ian -- 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/CAOyqgcVbnMgfEzacRybwUZz%3D5DtfJStVDs9Ny6Zsik28uu4%2B6A%40mail.gmail.com.