From e2516444b10e08b09f90f2086fc6e73691555e3b Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Mon, 6 Feb 2023 15:26:24 +0100 Subject: [PATCH] add comment about the embedded html files after review note by jonathan hall, thanks! --- http/account.go | 2 ++ http/admin.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/http/account.go b/http/account.go index bd2fe09..3784efb 100644 --- a/http/account.go +++ b/http/account.go @@ -82,6 +82,8 @@ func accountHandle(w http.ResponseWriter, r *http.Request) { if r.Method == "GET" && r.URL.Path == "/account/" { w.Header().Set("Content-Type", "text/html; charset=utf-8") w.Header().Set("Cache-Control", "no-cache; max-age=0") + // We typically return the embedded admin.html, but during development it's handy + // to load from disk. f, err := os.Open("http/account.html") if err == nil { defer f.Close() diff --git a/http/admin.go b/http/admin.go index 307936c..b1e03cf 100644 --- a/http/admin.go +++ b/http/admin.go @@ -161,6 +161,8 @@ func adminHandle(w http.ResponseWriter, r *http.Request) { if r.Method == "GET" && r.URL.Path == "/admin/" { w.Header().Set("Content-Type", "text/html; charset=utf-8") w.Header().Set("Cache-Control", "no-cache; max-age=0") + // We typically return the embedded admin.html, but during development it's handy + // to load from disk. f, err := os.Open("http/admin.html") if err == nil { defer f.Close()