Skip to content

Commit

Permalink
Add logs while loading apnic data
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Nov 27, 2023
1 parent 47260dd commit 13bab12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daze.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ func Salt(s string) []byte {
// LoadApnic loads remote resource. APNIC is the Regional Internet Registry administering IP addresses for the Asia
// Pacific.
func LoadApnic() map[string][]*net.IPNet {
log.Println("main: load apnic data from http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest")
f := doa.Try(OpenFile("http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest"))
defer f.Close()
r := map[string][]*net.IPNet{}
Expand Down Expand Up @@ -1114,6 +1115,7 @@ func LoadApnic() map[string][]*net.IPNet {
r[seps[1]] = append(r[seps[1]], cidr)
}
}
log.Println("main: load apnic done")
return r
}

Expand Down

0 comments on commit 13bab12

Please sign in to comment.