From 57fac8b7b7e1a5f8372df3c7a66217ef4b8fe76c Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Tue, 6 Sep 2022 22:32:35 +0200 Subject: [PATCH] Write HTML files and link from the index --- main.go | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 08e60ce..ea144d3 100644 --- a/main.go +++ b/main.go @@ -23,14 +23,14 @@ type Node struct { Data NodeData } -func (n Node) writeHTML(w io.Writer) { +func (n *Node) writeIndex(w io.Writer) { tmpl, err := template.New("root").Parse(` {{ define "tree" }} {{ if gt (len .Children) 0 }}