func Delete(h http.HandlerFunc) http.HandlerFunc {
	return HTTPHandlerWithMethod("DELETE", h)
}
Delete only allows DELETE requests to a handler
package main
import (
	"fmt"
	"net/http"
)
func HTTPHandlerWithMethod(method string, h http.HandlerFunc) http.HandlerFunc {
	return func(r http.ResponseWriter, req *http.Request) {
		if req.Method != method {
			r.Header().Add("Content-Type", "application/json")
			r.WriteHeader(http.StatusMethodNotAllowed)
			r.Write([]byte(fmt.Sprintf(`{"message": "Given method not allowed", "method": %v}`, req.Method)))
			return
		}
		h(r, req)
	}
}
func Post(h http.HandlerFunc) http.HandlerFunc {
	return HTTPHandlerWithMethod("POST", h)
}
func Get(h http.HandlerFunc) http.HandlerFunc {
	return HTTPHandlerWithMethod("GET", h)
}
func Patch(h http.HandlerFunc) http.HandlerFunc {
	return HTTPHandlerWithMethod("PATCH", h)
}