rpc: update fuzz criteria to match the implementation (#7595)

I missed this during my previous pass.

Requirements for handlers:

- First argument is context.Context.
- Last of two results is error.
This commit is contained in:
M. J. Fromberger
2022-01-14 06:41:57 -08:00
committed by GitHub
parent ec59b1a1ae
commit 9409cdea55

View File

@@ -2,6 +2,7 @@ package server
import (
"bytes"
"context"
"encoding/json"
"io"
"net/http"
@@ -13,7 +14,9 @@ import (
)
var rpcFuncMap = map[string]*rs.RPCFunc{
"c": rs.NewRPCFunc(func(s string, i int) (string, int) { return "foo", 200 }, "s", "i"),
"c": rs.NewRPCFunc(func(ctx context.Context, s string, i int) (string, error) {
return "foo", nil
}, "s", "i"),
}
var mux *http.ServeMux