NewSuccessResponse 创建成功响应
(id any, result any)
| 252 | |
| 253 | // NewSuccessResponse 创建成功响应 |
| 254 | func NewSuccessResponse(id any, result any) *JSONRPCResponse { |
| 255 | return &JSONRPCResponse{ |
| 256 | JSONRPC: "2.0", |
| 257 | ID: id, |
| 258 | Result: result, |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | // NewErrorResponse 创建错误响应 |
| 263 | func NewErrorResponse(id any, code int, message string, data any) *JSONRPCResponse { |
no outgoing calls