fix lint failures with 1.31 (#5489)

This commit is contained in:
Marko
2020-10-22 13:36:08 +02:00
committed by Erik Grinaker
parent 51b8d3a153
commit 9379bc92fd
58 changed files with 98 additions and 144 deletions
+1 -2
View File
@@ -380,7 +380,6 @@ func makeSecretConnPair(tb testing.TB) (fooSecConn, barSecConn *SecretConnection
return fooSecConn, barSecConn
}
///////////////////////////////////////////////////////////////////////////////
// Benchmarks
func BenchmarkWriteSecretConnection(b *testing.B) {
@@ -428,7 +427,7 @@ func BenchmarkWriteSecretConnection(b *testing.B) {
if err := fooSecConn.Close(); err != nil {
b.Error(err)
}
//barSecConn.Close() race condition
// barSecConn.Close() race condition
}
func BenchmarkReadSecretConnection(b *testing.B) {
+1 -1
View File
@@ -75,7 +75,7 @@ func (tr *TestReactor) Receive(chID byte, peer Peer, msgBytes []byte) {
if tr.logMessages {
tr.mtx.Lock()
defer tr.mtx.Unlock()
//fmt.Printf("Received: %X, %X\n", chID, msgBytes)
// fmt.Printf("Received: %X, %X\n", chID, msgBytes)
tr.msgsReceived[chID] = append(tr.msgsReceived[chID], PeerMessage{peer.ID(), msgBytes, tr.msgsCounter})
tr.msgsCounter++
}
+1 -1
View File
@@ -269,7 +269,7 @@ func soapRequest(url, function, message, domain string) (r *http.Response, err e
}
req.Header.Set("Content-Type", "text/xml ; charset=\"utf-8\"")
req.Header.Set("User-Agent", "Darwin/10.0.0, UPnP/1.0, MiniUPnPc/1.3")
//req.Header.Set("Transfer-Encoding", "chunked")
// req.Header.Set("Transfer-Encoding", "chunked")
req.Header.Set("SOAPAction", "\"urn:"+domain+":service:WANIPConnection:1#"+function+"\"")
req.Header.Set("Connection", "Close")
req.Header.Set("Cache-Control", "no-cache")