package main import ( "pihole-blocklist/bind/internal/config" "time" ) var cfg config.Config func main() { // Blocklist Collection // https://firebog.net/ cfg = config.Init() // Set the zone serial number cfg.ConfigFile.ZoneConfig.Serial = time.Now().In(cfg.TZLocal).Format("0601021504") // get remote URL data badDomains := getListData() // clean-up cfg.ConfigFile.ZoneConfig.BlockedDomains = cleanBadDomains(badDomains) // write file if err := buildBindResponsePolicyFile(); err != nil { cfg.Log.Error("unable to write file", "error", err, "path", cfg.BindOutputFileName) } }