From 918c08b0e7ab2886820a10d769ac218d57a901dd Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 1 Jul 2021 18:40:10 -0700 Subject: [PATCH 1/2] fix go vet --- ssms_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssms_test.go b/ssms_test.go index 7b8b8f3..45470da 100644 --- a/ssms_test.go +++ b/ssms_test.go @@ -63,7 +63,7 @@ func TestNoCommonProto(t *testing.T) { defer a.Close() _, _, err := at.SecureInbound(ctx, a) if err == nil { - t.Fatal("conection should have failed") + t.Error("conection should have failed") } }() @@ -72,7 +72,7 @@ func TestNoCommonProto(t *testing.T) { defer b.Close() _, _, err := bt.SecureOutbound(ctx, b, "peerA") if err == nil { - t.Fatal("connection should have failed") + t.Error("connection should have failed") } }() wg.Wait() From 98ead346b1c84cb93b23480b1257a00c3c702d75 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 1 Jul 2021 18:40:17 -0700 Subject: [PATCH 2/2] fix staticcheck --- ssms.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssms.go b/ssms.go index ad1e84f..6e56ad2 100644 --- a/ssms.go +++ b/ssms.go @@ -64,7 +64,7 @@ func (sm *SSMuxer) SecureOutbound(ctx context.Context, insecure net.Conn, p peer // ensure the correct peer connected to us if sconn.RemotePeer() != p { sconn.Close() - return nil, false, fmt.Errorf("Unexpected peer") + return nil, false, fmt.Errorf("unexpected peer") } } else { sconn, err = tpt.SecureOutbound(ctx, insecure, p)