diff options
author | Julien Dessaux | 2024-04-02 02:06:10 +0200 |
---|---|---|
committer | Julien Dessaux | 2024-04-02 02:09:34 +0200 |
commit | d023b41fa86f62c4eac706616cae025fb2f90a70 (patch) | |
tree | a274e123e617b29311896b7acd251f939b1f0506 /main.go | |
parent | chore(ods): added forgotten file (diff) | |
download | ods-d023b41fa86f62c4eac706616cae025fb2f90a70.tar.gz ods-d023b41fa86f62c4eac706616cae025fb2f90a70.tar.bz2 ods-d023b41fa86f62c4eac706616cae025fb2f90a70.zip |
chore(ods): added logging of search results and updated code comments
Diffstat (limited to '')
-rw-r--r-- | main.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -12,7 +12,7 @@ import ( "unicode" ) -// Variables to customise the search behaviour +// Variables to customise the search const ( listenStr = "0.0.0.0:8090" ) @@ -63,12 +63,12 @@ func postIndex() http.Handler { break } } + slog.Info("post", "word", query, "invalid", data.Invalid) w.Header().Set("Cache-Control", "no-store, no-cache") indexTemplate.ExecuteTemplate(w, "index.html", data) }) } -// The main function func main() { http.Handle("GET /static/", http.FileServer(http.FS(static))) http.Handle("GET /", getIndex()) |