Skip to content

Commit

Permalink
More linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby committed Jun 27, 2023
1 parent 3a10a41 commit b6d4eb8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/staticcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...
2 changes: 1 addition & 1 deletion forwardproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
12 changes: 0 additions & 12 deletions probe_resist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b6d4eb8

Please sign in to comment.