fangyincheng commented on a change in pull request #1271: URL: https://github.com/apache/dubbo-go/pull/1271#discussion_r663331101
########## File path: filter/filter_impl/generic/hessian2.go ########## @@ -0,0 +1,159 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package generic + +import ( + "reflect" + "strings" + "time" +) + +import ( + hessian "github.com/apache/dubbo-go-hessian2" + perrors "github.com/pkg/errors" +) + +import ( + "dubbo.apache.org/dubbo-go/v3/common/extension" + "dubbo.apache.org/dubbo-go/v3/filter" +) + +const ( + // same with dubbo + Hessian2 = "true" Review comment: 我觉得应该考虑是否在使用中会同时有”true“和“hessian2”两个值同时使用,如果有,那么应该都能支持,不能让get(“hessian2”)报错不是? ########## File path: filter/filter_impl/generic_service_filter.go ########## @@ -121,7 +117,7 @@ func (ef *GenericServiceFilter) OnResponse(ctx context.Context, result protocol. if v.Kind() == reflect.Ptr { v = v.Elem() } - result.SetResult(struct2MapAll(v.Interface())) + result.SetResult(generic.Struct2MapAll(v.Interface())) Review comment: 在hessian和json协议下,都需要generic.Struct2mapall? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
