k but want idempotent

main
bel 2024-11-12 07:39:24 -07:00
parent eebc1df537
commit fc5b26d74d
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ func main() {
log.Println("listening on", *p)
if err := http.ListenAndServe(":"+strconv.Itoa(*p), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if err := handle(w, r); err != nil {
log.Println("!", err)
http.Error(w, err.Error(), http.StatusBadRequest)
}
})); err != nil {