This is an automated email from the ASF dual-hosted git repository.
fangyc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git
The following commit(s) were added to refs/heads/master by this push:
new 8a78946 fix the problems of v1.4
new df2a240 Merge pull request #171 from wongoo/master
8a78946 is described below
commit 8a789469d2ccd39096d8f11477d0c67d001bb3d9
Author: wongoo <[email protected]>
AuthorDate: Sat Mar 21 10:42:51 2020 +0800
fix the problems of v1.4
---
java_exception_test.go | 2 ++
response.go | 2 ++
2 files changed, 4 insertions(+)
diff --git a/java_exception_test.go b/java_exception_test.go
index 00d7179..07cd35a 100644
--- a/java_exception_test.go
+++ b/java_exception_test.go
@@ -19,7 +19,9 @@ package hessian
import (
"testing"
+)
+import (
"github.com/stretchr/testify/assert"
)
diff --git a/response.go b/response.go
index 1fede8e..0b2a97f 100644
--- a/response.go
+++ b/response.go
@@ -33,6 +33,7 @@ import (
"github.com/apache/dubbo-go-hessian2/java_exception"
)
+// Response dubbo response
type Response struct {
RspObj interface{}
Exception error
@@ -51,6 +52,7 @@ func NewResponse(rspObj interface{}, exception error,
attachments map[string]str
}
}
+// EnsureResponse check body type, make sure it's a Response or package it as
a Response
func EnsureResponse(body interface{}) *Response {
if res, ok := body.(*Response); ok {
return res