func deleteAllFunc(ws worker.WatchService) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { err := ws.Clear() if err != nil { http.Error(w, err.Error(), GOOSE_ERROR) return } w.WriteHeader(http.StatusNoContent) } }