ing
This commit is contained in:
parent
5f64fccd7c
commit
0e6d2d1b4b
|
@ -130,13 +130,15 @@ func (src *ServerRequestCodec) NewResponse(reply interface{}, err error) ([]byte
|
||||||
func (src *ServerRequestCodec) NewResponseWithString(reply string, err error) ([]byte, error) {
|
func (src *ServerRequestCodec) NewResponseWithString(reply string, err error) ([]byte, error) {
|
||||||
res := src.newServerResponse(nil, err)
|
res := src.newServerResponse(nil, err)
|
||||||
|
|
||||||
var i interface{}
|
if "" != reply {
|
||||||
mErr := json.Unmarshal([]byte(reply), &i)
|
var i interface{}
|
||||||
if nil != mErr {
|
mErr := json.Unmarshal([]byte(reply), &i)
|
||||||
return nil, mErr
|
if nil != mErr {
|
||||||
}
|
return nil, mErr
|
||||||
|
}
|
||||||
|
|
||||||
res.Result = i
|
res.Result = i
|
||||||
|
}
|
||||||
return json.Marshal(res)
|
return json.Marshal(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user