17 lines
305 B
Go
17 lines
305 B
Go
package main
|
|
|
|
import (
|
|
"bufio"
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
scanner := bufio.NewScanner(os.Stdin)
|
|
for scanner.Scan() {
|
|
fmt.Println(scanner.Text()) // Println will add back the final '\n'
|
|
}
|
|
if err := scanner.Err(); err != nil {
|
|
_, _ = fmt.Fprintln(os.Stderr, "reading standard input:", err)
|
|
}
|
|
}
|