some library updates and adds support for adblock lists

This commit is contained in:
2025-05-02 20:57:03 -05:00
parent 03b1cc13ee
commit ce4b4a11ff
19 changed files with 712 additions and 139 deletions

View File

@ -5,8 +5,10 @@ import (
"text/template"
"pihole-blocklist/bind/assets"
"pihole-blocklist/bind/internal/config"
"gitlab.smoothnet.org/nhyatt/bind-response-policy-zone-creator/assets"
"gitlab.smoothnet.org/nhyatt/bind-response-policy-zone-creator/internal/common"
"gitlab.smoothnet.org/nhyatt/bind-response-policy-zone-creator/internal/log"
)
func buildBindResponsePolicyFile() error {
@ -25,11 +27,11 @@ func buildBindResponsePolicyFile() error {
return err
}
bytesWritten, err := config.WriteFile(cfg.BindOutputFileName, output.Bytes())
bytesWritten, err := common.WriteFile(cfg.BindOutputFileName, output.Bytes())
if err != nil {
return err
}
cfg.Log.Debug("file created", "file", cfg.BindOutputFileName, "bytes", bytesWritten)
log.Debug("file created", "file", cfg.BindOutputFileName, "bytes", bytesWritten)
return nil
}