Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Iterator patterns in Go. Parent comment
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.
An example, scanning lines from standard input: