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