您需要使用来将
mw.Middleware()statement 的第二个参数包装为
http.Handlertype
http.HandlerFunc()。
func (h Handler) makeGetMany(v Injection) http.HandlerFunc { return mw.Middleware( mw.Allow("admin"), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { log.Println("now we are sending response."); json.NewEnprer(w).Enpre(v.Share) }), )}


