aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index 7eba79e..b7ae65c 100644
--- a/main.go
+++ b/main.go
@@ -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 {