diff --git a/main.go b/main.go index 38ec72a..5723745 100644 --- a/main.go +++ b/main.go @@ -59,13 +59,18 @@ func main() { func load() { _, err := os.Stat(blocklistFile) if os.IsNotExist(err) { + log.Warnf("No blocklistFile: %V\n", err) return } bytes, err := ioutil.ReadFile(blocklistFile) if err != nil { + log.Errorf("Couldn't read blocklist file: %v\n", err) return } - json.Unmarshal(bytes, blocklistedIps) + err = json.Unmarshal(bytes, &blocklistedIps) + if err != nil { + log.Errorf("Couldn't unmarshal blocklisted IPs: %v\n", err) + } return }