This PR enables wastedassign and whitespace linters. And fixes the following issues:
❯ golangci-lint run
server.go:2294: unnecessary leading newline (whitespace)
if ctx.Request.MayContinue() {
tcpdialer.go:378: unnecessary trailing newline (whitespace)
}
server_test.go:1922: unnecessary leading newline (whitespace)
for i := 0; i < 25; i++ {
args.go:554:2: assigned to idx, but reassigned without using the value (wastedassign)
idx := 0
^
server.go:1849:3: assigned to c, but reassigned without using the value (wastedassign)
c = nil
^
server.go:2587:2: assigned to ctx, but reassigned without using the value (wastedassign)
ctx = nil
^
workerpool.go:113:8: assigned to mid, but reassigned without using the value (wastedassign)
l, r, mid := 0, n-1, 0
^
workerpool.go:241:3: assigned to c, but reassigned without using the value (wastedassign)
c = nil
^
streaming_test.go:34:4: assigned to body, but reassigned without using the value (wastedassign)
body := ""
^
This PR enables
wastedassign
andwhitespace
linters. And fixes the following issues: