refactor: renamings map and struct log parser

This commit is contained in:
Inanc Gumus
2019-04-26 10:10:52 +03:00
parent 8053066a6b
commit fba3125c8e
2 changed files with 16 additions and 16 deletions

View File

@@ -38,6 +38,8 @@ func main() {
return
}
domain := fields[0]
// Sum the total visits per domain
visits, err := strconv.Atoi(fields[1])
if visits < 0 || err != nil {
@@ -45,8 +47,6 @@ func main() {
return
}
domain := fields[0]
// Collect the unique domains
if _, ok := sum[domain]; !ok {
domains = append(domains, domain)