On Fri, Oct 26, 2018 at 6:04 AM robert engels <reng...@ix.netcom.com> wrote: > Barring that, I don’t see how > > for(i:=c.Iterator();i.HasNext();) { > v := i.Next() > } > > is that much more difficult to use
Yes, an iterator with a Next method (possibly with another name) is the idiomatic way to present database-y things when you don't necessarily want to pull the whole result set into memory. David Anderson already mentioned the bufio.Scanner type. There's also: https://golang.org/pkg/database/sql/#example_Rows https://golang.org/pkg/debug/dwarf/#Reader.Next https://cloud.google.com/appengine/docs/standard/go/datastore/reference#hdr-Queries https://godoc.org/github.com/golang/leveldb/db -- 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. For more options, visit https://groups.google.com/d/optout.