Skip to content

Commit 2fec0c7

Browse files
committed
make lint happy
1 parent a9d5e9e commit 2fec0c7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

handler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func (s *handler) handleReader(ctx context.Context, r io.Reader, w io.Writer, rp
239239
return
240240
}
241241

242-
w.Write([]byte("["))
242+
_, _ = w.Write([]byte("[")) // todo consider handling this error
243243
for idx, req := range reqs {
244244
if req.ID, err = normalizeID(req.ID); err != nil {
245245
rpcError(wf, &req, rpcParseError, xerrors.Errorf("failed to parse ID: %w", err))
@@ -249,10 +249,10 @@ func (s *handler) handleReader(ctx context.Context, r io.Reader, w io.Writer, rp
249249
s.handle(ctx, req, wf, rpcError, func(bool) {}, nil)
250250

251251
if idx != len(reqs)-1 {
252-
w.Write([]byte(","))
252+
_, _ = w.Write([]byte(",")) // todo consider handling this error
253253
}
254254
}
255-
w.Write([]byte("]"))
255+
_, _ = w.Write([]byte("]")) // todo consider handling this error
256256
} else {
257257
var req request
258258
if err := json.NewDecoder(bufferedRequest).Decode(&req); err != nil {

rpc_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,10 @@ func TestChanClientReceiveAll(t *testing.T) {
10071007
}
10081008

10091009
func TestControlChanDeadlock(t *testing.T) {
1010-
logging.SetLogLevel("rpc", "error")
1011-
defer logging.SetLogLevel("rpc", "debug")
1010+
_ = logging.SetLogLevel("rpc", "error")
1011+
defer func() {
1012+
_ = logging.SetLogLevel("rpc", "debug")
1013+
}()
10121014

10131015
for r := 0; r < 20; r++ {
10141016
testControlChanDeadlock(t)

0 commit comments

Comments
 (0)