jjzjj

CustomContext

全部标签

go - Echo 无法在 HTTPErrorHandler 中使用自定义上下文

e.Use(func(hecho.HandlerFunc)echo.HandlerFunc{returnfunc(cecho.Context)error{cc:=c.(*CustomContext)returnh(cc)}})e.HTTPErrorHandler=func(errerror,cecho.Context){cc:=c.(*CustomContext)}我设置了自定义HTTPErrorHandler和CustomContext。我想在HTTPErrorHandler中使用CustomContext。c.Error(echo.NewHTTPError(http.StatusU