Somewhat working

This commit is contained in:
Magnus Åhall 2026-02-23 07:59:45 +01:00
parent ad638acaf3
commit 4637689db4
6 changed files with 52 additions and 12 deletions

View file

@ -66,13 +66,10 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
slices.SortFunc(entries, SortDNSRecord)
data["DNSRecords"] = entries
fmt.Printf("\n\x1b[32;1mSTART\x1b[0m\n")
tree := BuildRecordsTree(entries)
htmlTree := tree.ToHTML([]string{})
data["Tree"] = template.HTML(htmlTree)
fmt.Printf("\n\x1b[32;1mDONE\x1b[0m\n")
j, _ := json.Marshal(tree)
os.WriteFile("/tmp/tree.json", j, 0644)