23-input-scanning/questions/README.md
1: That's right. The input stream can come from any data source. Standard Input is one of them, and you can redirect it to almost any data source like user input, files, website contents and so on.
2-4: Yes, that may be an input stream, but it doesn't explain what an input stream is.
in := bufio.Scanner(os.Stdin)
in.Scan() // user enters: "hi!"
in.Scan() // user enters: "how are you?"
fmt.Println(in.Text())
3: The Text() method only returns the last scanned token. A token can be a line or a word and so on.
in := bufio.Scanner(os.Stdin)
// ...
in = bufio.NewScanner(in, bufio.ScanWords)in.Split(bufio.ScanWords) CORRECTin.ScanWords()2: That's right. bufio has a few splitters like ScanWords such as ScanLines (the default), ScanRunes, and so on.
regexp.MustCompile("...")
3: "Must" prefix is a convention. If a function or method may panic (= crash a program), then it's usually being prefixed with a "must" prefix.