Pull request:* all: fix all staticcheck SA warnings

Merge in DNS/adguard-home from 2238-fix-static-analisys-warnings to master

Squashed commit of the following:

commit 721ca6fa1cbfdfe9d414e6ed52fec4a64653fb52
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Oct 30 15:48:10 2020 +0300

    * all: fix all staticcheck SA warnings

    Closes #2238.
This commit is contained in:
Eugene Burkov
2020-10-30 19:18:51 +03:00
parent ae8de95d89
commit 812b43a4b3
7 changed files with 16 additions and 27 deletions

View File

@@ -815,12 +815,13 @@ func sendTestMessageAsync(t *testing.T, conn *dns.Conn, g *sync.WaitGroup) {
req := createGoogleATestMessage()
err := conn.WriteMsg(req)
if err != nil {
t.Fatalf("cannot write message: %s", err)
panic(fmt.Sprintf("cannot write message: %s", err))
}
res, err := conn.ReadMsg()
if err != nil {
t.Fatalf("cannot read response to message: %s", err)
panic(fmt.Sprintf("cannot read response to message: %s", err))
}
assertGoogleAResponse(t, res)
}