25 lines
390 B
Go
25 lines
390 B
Go
// For more tutorials: https://blog.learngoprogramming.com
|
|
//
|
|
// Copyright © 2018 Inanc Gumus
|
|
// Learn Go Programming Course
|
|
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
//
|
|
|
|
package main
|
|
|
|
import (
|
|
"bufio"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
p := newParser()
|
|
|
|
in := bufio.NewScanner(os.Stdin)
|
|
for in.Scan() {
|
|
p.parse(in.Text())
|
|
}
|
|
|
|
summarize(p.summarize(), p.err(), in.Err())
|
|
}
|