lint: cleanup pending lint errors (#7237)

This commit is contained in:
Sam Kleinman
2021-11-04 08:08:55 -04:00
committed by GitHub
parent 61831cf5ef
commit 4ef140f6ca
35 changed files with 65 additions and 46 deletions
+1
View File
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10
package conn
+1
View File
@@ -1,3 +1,4 @@
//go:build !go1.10
// +build !go1.10
package conn
+2 -1
View File
@@ -194,7 +194,8 @@ func TestSecretConnectionReadWrite(t *testing.T) {
compareWritesReads := func(writes []string, reads []string) {
for {
// Pop next write & corresponding reads
var read, write string = "", writes[0]
var read = ""
var write = writes[0]
var readCount = 0
for _, readChunk := range reads {
read += readChunk
+4 -4
View File
@@ -316,10 +316,10 @@ func (na *NetAddress) ReachabilityTo(o *NetAddress) int {
}
return Default
default: /* ipv6 */
var tunnelled bool
// Is our v6 is tunnelled?
var tunneled bool
// Is our v6 is tunneled?
if o.RFC3964() || o.RFC6052() || o.RFC6145() {
tunnelled = true
tunneled = true
}
switch {
case !o.Routable():
@@ -328,7 +328,7 @@ func (na *NetAddress) ReachabilityTo(o *NetAddress) int {
return Teredo
case o.IP.To4() != nil:
return Ipv4
case tunnelled:
case tunneled:
// only prioritise ipv6 if we aren't tunnelling it.
return Ipv6Weak
}