func jsonResponse(rw http.ResponseWriter, code int, msg string) {
	rw.Header().Set("Content-Type", "application/json")
	rw.WriteHeader(code)
	rw.Write([]byte(fmt.Sprintf(`{"message":"%s"}`, msg)))
}
jsonResponse is an internal convenience function to write a json response
package webhook
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)
type Registry struct {
	m       *monitor
	Changes chan []W
}
func NewRegistry(mon *monitor) Registry {
	return Registry{
		m:       mon,
		Changes: mon.changes,
	}
}