mirror of
https://github.com/idanoo/go-mastodon-matrix-webhooks.git
synced 2024-11-22 08:25:17 +00:00
Looking up logs
This commit is contained in:
parent
66468545ba
commit
3d4ec5c116
6
main.go
6
main.go
@ -116,15 +116,17 @@ func ipLookup(ip string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("Looking up: %s", ip)
|
||||||
|
|
||||||
db, err := ip2location.OpenDB(IP2LOCATION_FILE)
|
db, err := ip2location.OpenDB(IP2LOCATION_FILE)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Print(err)
|
log.Print(err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
results, err := db.Get_all(ip)
|
results, err := db.Get_all(ip)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Print(err)
|
log.Print(err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user