blob: 2388034aacd94e4f29b70ab2bf25af83cc5421f4 [file] [log] [blame]
// +build ignore,OMIT
package main
import (
"bufio"
"fmt"
"log"
"strings"
)
func main() {
// START OMIT
const input = "Now is the winter of our discontent..."
scanner := bufio.NewScanner(strings.NewReader(input))
scanner.Split(bufio.ScanWords) // HL
count := 0
for scanner.Scan() {
count++
}
if err := scanner.Err(); err != nil {
log.Fatal(err)
}
fmt.Println(count)
// STOP OMIT
}