News for hackers. Stuff that matters.
Re:Iterator patterns in Go by enneff on Sunday September 08, 2013 @12:13AM (#6347794)
A notable use of this pattern is bufio.Scanner: http://golang.org/pkg/bufio/#Scanner

An example, scanning lines from standard input:

    s := bufio.NewScanner(os.Stdin)
    for s.Scan() {
        fmt.Println(s.Text()) 
    }
    if err := s.Err(); err != nil {
        fmt.Fprintln(os.Stderr, "reading standard input:", err)
    }

There are no comments on this comment yet.