1
0
This commit is contained in:
Stephen McQuay 2015-03-13 16:10:00 -07:00
commit 9b9105e77b

23
main.go Normal file
View File

@ -0,0 +1,23 @@
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
i := 0
s := bufio.NewScanner(os.Stdin)
for ; s.Scan(); i++ {
fmt.Printf(
"%d\t%s\n",
i,
s.Text(),
)
}
if err := s.Err(); err != nil {
fmt.Fprintln(os.Stderr, "err:", err)
os.Exit(1)
}
}