add: error handling to scanner example

This commit is contained in:
Inanc Gumus
2019-04-27 10:45:47 +03:00
parent 8cff19f314
commit 28903ad6c8
7 changed files with 38 additions and 1 deletions

View File

@@ -88,6 +88,10 @@ func main() {
// // Print the total visits for all domains
// fmt.Printf("\n%-30s %10d\n", "TOTAL", p.Total)
// if err := in.Err(); err != nil {
// fmt.Println("> Err:", err)
// }
s, _ := json.MarshalIndent(p, "", "\t")
fmt.Println(string(s))
}