Merge pull request #48 from wongoo/fix-readme
fix syntax in readme
diff --git a/request.go b/request.go
index 6cbe15a..032fc50 100644
--- a/request.go
+++ b/request.go
@@ -119,6 +119,7 @@
// dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/codec/ExchangeCodec.java
// v2.5.4 line 204 encodeRequest
+// todo: attachments
func packRequest(service Service, header DubboHeader, params interface{}) ([]byte, error) {
var (
err error
diff --git a/response.go b/response.go
index b6151ec..c610d34 100644
--- a/response.go
+++ b/response.go
@@ -66,13 +66,13 @@
var resWithException, resValue, resNullValue int32
if atta {
- resWithException = RESPONSE_WITH_EXCEPTION
- resValue = RESPONSE_VALUE
- resNullValue = RESPONSE_NULL_VALUE
- } else {
resWithException = RESPONSE_WITH_EXCEPTION_WITH_ATTACHMENTS
resValue = RESPONSE_VALUE_WITH_ATTACHMENTS
resNullValue = RESPONSE_NULL_VALUE_WITH_ATTACHMENTS
+ } else {
+ resWithException = RESPONSE_WITH_EXCEPTION
+ resValue = RESPONSE_VALUE
+ resNullValue = RESPONSE_NULL_VALUE
}
if e, ok := ret.(error); ok { // throw error
@@ -105,7 +105,7 @@
}
// hessian decode response body
-// todo: need to read attachments, but don't known it's effect yet
+// todo: need to read attachments
func unpackResponseBody(buf []byte, rspObj interface{}) error {
// body
decoder := NewDecoder(buf[:])