More linter fixes
This commit is contained in:
parent
3a10a41c32
commit
b6d4eb85cd
3 changed files with 2 additions and 14 deletions
2
.github/workflows/staticcheck.yml
vendored
2
.github/workflows/staticcheck.yml
vendored
|
|
@ -30,4 +30,4 @@ jobs:
|
|||
- name: Install staticcheck
|
||||
run: go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
- name: Run staticcheck
|
||||
run: staticcheck ./...
|
||||
run: staticcheck -tests=False ./...
|
||||
|
|
@ -624,7 +624,7 @@ func dualStream(target net.Conn, clientReader io.ReadCloser, clientWriter io.Wri
|
|||
}
|
||||
return _err
|
||||
}
|
||||
go stream(target, clientReader)
|
||||
go stream(target, clientReader) //nolint: errcheck
|
||||
return stream(clientWriter, target)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -342,14 +342,6 @@ func responsesAreEqual(res1, res2 *http.Response) error {
|
|||
if !ok {
|
||||
return fmt.Errorf("header \"%s: %s\" is absent in res2", k1, v1)
|
||||
}
|
||||
// if k1Lower == "location" {
|
||||
// for i, h := range v2 {
|
||||
// v2[i] = removeAddressesStr(h)
|
||||
// }
|
||||
// for i, h := range v1 {
|
||||
// v1[i] = removeAddressesStr(h)
|
||||
// }
|
||||
// }
|
||||
if errStr = stringSlicesAreEqual(v1, v2); errStr != "" {
|
||||
return fmt.Errorf("header \"%s\" is different: %s", k1, errStr)
|
||||
}
|
||||
|
|
@ -389,10 +381,6 @@ func removeAddressesByte(b []byte) []byte {
|
|||
return b
|
||||
}
|
||||
|
||||
func removeAddressesStr(s string) string {
|
||||
return string(removeAddressesByte([]byte(s)))
|
||||
}
|
||||
|
||||
func changePort(inputAddr, toPort string) string {
|
||||
host, _, err := net.SplitHostPort(inputAddr)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue