Skip to content

Commit 6301dbd

Browse files
committed
Fix golangci-linter errors
1 parent 24ad20c commit 6301dbd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

example_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type (
2929
}
3030
)
3131

32-
func (h EchoHandler) ServeJSONRPC(c context.Context, params *json.RawMessage) (interface{}, *jsonrpc.Error) {
32+
func (h EchoHandler) ServeJSONRPC(_ context.Context, params *json.RawMessage) (interface{}, *jsonrpc.Error) {
3333
var p EchoParams
3434
if err := jsonrpc.Unmarshal(params, &p); err != nil {
3535
return nil, err
@@ -40,7 +40,7 @@ func (h EchoHandler) ServeJSONRPC(c context.Context, params *json.RawMessage) (i
4040
}, nil
4141
}
4242

43-
func (h PositionalHandler) ServeJSONRPC(c context.Context, params *json.RawMessage) (interface{}, *jsonrpc.Error) {
43+
func (h PositionalHandler) ServeJSONRPC(_ context.Context, params *json.RawMessage) (interface{}, *jsonrpc.Error) {
4444
var p PositionalParams
4545
if err := jsonrpc.Unmarshal(params, &p); err != nil {
4646
return nil, err

handler.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ func (f HandlerFunc) ServeJSONRPC(c context.Context, params *json.RawMessage) (a
2828
func (mr *MethodRepository) ServeHTTP(w http.ResponseWriter, r *http.Request) {
2929
rs, batch, err := ParseRequest(r)
3030
if err != nil {
31-
//nolint: contextcheck
3231
err := SendResponse(w, []*Response{
3332
{
3433
Version: Version,
@@ -48,7 +47,6 @@ func (mr *MethodRepository) ServeHTTP(w http.ResponseWriter, r *http.Request) {
4847
resp[i] = mr.InvokeMethod(r.Context(), rs[i])
4948
}
5049

51-
//nolint: contextcheck
5250
if err := SendResponse(w, resp, batch); err != nil {
5351
fmt.Fprint(w, "Failed to encode result objects")
5452
w.WriteHeader(http.StatusInternalServerError)

0 commit comments

Comments
 (0)