diff --git a/net/ghttp/ghttp_server_service_handler.go b/net/ghttp/ghttp_server_service_handler.go index d7c2cac05cc..76de26aaae8 100644 --- a/net/ghttp/ghttp_server_service_handler.go +++ b/net/ghttp/ghttp_server_service_handler.go @@ -221,28 +221,6 @@ func (s *Server) checkAndCreateFuncInfo( } */ - // The request struct should be named as `xxxReq`. - reqStructName := trimGeneric(reflectType.In(1).String()) - if !gstr.HasSuffix(reqStructName, `Req`) { - err = gerror.NewCodef( - gcode.CodeInvalidParameter, - `invalid struct naming for request: defined as "%s", but it should be named with "Req" suffix like "XxxReq"`, - reqStructName, - ) - return - } - - // The response struct should be named as `xxxRes`. - resStructName := trimGeneric(reflectType.Out(0).String()) - if !gstr.HasSuffix(resStructName, `Res`) { - err = gerror.NewCodef( - gcode.CodeInvalidParameter, - `invalid struct naming for response: defined as "%s", but it should be named with "Res" suffix like "XxxRes"`, - resStructName, - ) - return - } - funcInfo.IsStrictRoute = true inputObject = reflect.New(funcInfo.Type.In(1).Elem())