Aetherance commented on code in PR #3086:
URL: https://github.com/apache/dubbo-go/pull/3086#discussion_r2616841809
##########
protocol/triple/triple_protocol/client.go:
##########
@@ -117,8 +121,27 @@ func NewClient(httpClient HTTPClient, url string, options
...ClientOption) *Clie
return client
}
+func buildMethodLevelReqSpec(serviceLevelReqSpec *Spec, method string) (Spec,
error) {
+ if serviceLevelReqSpec == nil {
+ return Spec{}, fmt.Errorf("serviceLevelReqSpec is nil")
+ }
+ methodLevelSpec := *serviceLevelReqSpec
+
+ methodLevelURL, err := joinPath(methodLevelSpec.Procedure, method)
+ if err != nil {
+ return Spec{}, fmt.Errorf("JoinPath failed for procedure %s,
method %s", methodLevelSpec.Procedure, method)
+ }
+
+ methodLevelSpec.Procedure = methodLevelURL
+ return methodLevelSpec, nil
+}
+
+func joinPath(base string, elem ...string) (result string, err error) {
+ return url.JoinPath(base, elem...)
+}
Review Comment:
这个是从 protocol/triple/common.go 搬过来的
这里确实不应该这样 已修复
--
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]