From 398636c9fbc3db2b70b37f584dbc3e20eaea632c Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 1 Apr 2021 17:14:00 +0700 Subject: [PATCH] minor staticcheck fixes --- relay_test.go | 2 +- util.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/relay_test.go b/relay_test.go index 220249d..a2a529e 100644 --- a/relay_test.go +++ b/relay_test.go @@ -299,7 +299,7 @@ func TestUnspecificRelayDialFails(t *testing.T) { } }() - addr := ma.StringCast(fmt.Sprintf("/p2p-circuit")) + addr := ma.StringCast("/p2p-circuit") rctx, rcancel := context.WithTimeout(ctx, time.Second) defer rcancel() diff --git a/util.go b/util.go index 92ebb1a..4435e0b 100644 --- a/util.go +++ b/util.go @@ -101,7 +101,7 @@ func (d *delimitedReader) ReadMsg(msg proto.Message) error { } if uint64(len(d.buf)) < mlen { - return errors.New("Message too large") + return errors.New("message too large") } buf := d.buf[:mlen]