diff options
author | hovertank3d <[email protected]> | 2025-01-17 17:31:09 +0100 |
---|---|---|
committer | hovertank3d <[email protected]> | 2025-01-17 17:31:09 +0100 |
commit | f60aec7f3669d9cd2e099d75b9d4ccd37035da57 (patch) | |
tree | 8d54fb17bb98eb0f19f9508df93e5592d57238ef /main.go | |
parent | 234a2ba96aeb91fb30603a90de22d71fc29632dd (diff) | |
download | lzcnt.space-f60aec7f3669d9cd2e099d75b9d4ccd37035da57.tar.xz lzcnt.space-f60aec7f3669d9cd2e099d75b9d4ccd37035da57.zip |
implement reset button
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -31,6 +31,11 @@ func main() { log.Fatal(err) } + http.HandleFunc("/reset", func(w http.ResponseWriter, r *http.Request) { + counter.Store(0) + http.Redirect(w, r, "/", http.StatusSeeOther) + }) + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { n := counter.Add(1) payload := struct { |