Somewhat working
This commit is contained in:
parent
ad638acaf3
commit
4637689db4
6 changed files with 52 additions and 12 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue