ing
This commit is contained in:
parent
dfb3b53775
commit
3b15bbd349
|
@ -148,16 +148,21 @@ func (src *ServerRequestCodec) Params() ([]string, error) {
|
|||
|
||||
var results []string
|
||||
for _, v := range values {
|
||||
b, err := json.Marshal(v)
|
||||
if nil != err {
|
||||
src.err = &Error{
|
||||
Code: E_INVALID_REQ,
|
||||
Message: err.Error(),
|
||||
Data: src.req.Params,
|
||||
switch v := v.(type) {
|
||||
case string:
|
||||
results = append(results, v)
|
||||
default:
|
||||
b, err := json.Marshal(v)
|
||||
if nil != err {
|
||||
src.err = &Error{
|
||||
Code: E_INVALID_REQ,
|
||||
Message: err.Error(),
|
||||
Data: src.req.Params,
|
||||
}
|
||||
return nil, src.err
|
||||
}
|
||||
return nil, src.err
|
||||
results = append(results, string(b))
|
||||
}
|
||||
results = append(results, string(b))
|
||||
}
|
||||
|
||||
return results, nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user