From 1b0195d4e3d3060afde056bb3c4c4a16daccd2c5 Mon Sep 17 00:00:00 2001 From: Max Resnick Date: Thu, 6 Mar 2025 22:28:26 -0800 Subject: feat: make sure the local-zone is under the serverkey --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 09fc095..051e6cd 100644 --- a/main.go +++ b/main.go @@ -104,6 +104,7 @@ func fetchDomainsAndWrite(url string, w *bufio.Writer, seen map[string]struct{}) } defer resp.Body.Close() + fmt.Fprint(w, "server:\n") var count int scanner := bufio.NewScanner(resp.Body) for scanner.Scan() { @@ -137,7 +138,7 @@ func fetchDomainsAndWrite(url string, w *bufio.Writer, seen map[string]struct{}) seen[domain] = struct{}{} count++ - if _, err := fmt.Fprintf(w, "local-zone: %q refuse\n", domain); err != nil { + if _, err := fmt.Fprintf(w, " local-zone: %q refuse\n", domain); err != nil { return fmt.Errorf("failed to write domain: %w", err) } } -- cgit v1.2.3