Use embedded index.html, bumped to v3

This commit is contained in:
Magnus Åhall 2025-11-12 07:55:03 +01:00
parent 2098da3417
commit 9dafb5383d

View file

@ -17,7 +17,7 @@ import (
"strings"
)
const VERSION = "v2"
const VERSION = "v3"
var (
flagVerbose bool
@ -69,10 +69,7 @@ func replaceTilde(str string) string { // {{{
func pageIndex(w http.ResponseWriter, r *http.Request) { // {{{
var tmpl *template.Template
var err error
if false {
tmpl, err = template.ParseFS(fs, "static/html/index.html")
}
tmpl, err = template.ParseFiles("static/html/index.html")
tmpl, err = template.ParseFS(fs, "static/html/index.html")
if err != nil {
w.Write([]byte(err.Error()))
return