Skip to content

Commit

Permalink
Pacify linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyHairy committed Jan 31, 2025
1 parent da52840 commit e402177
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (s *HTTPServer) authenticate(req *http.Request) (int, error) {

auth := req.Header.Get(proxyAuthHeaderKey)
if auth == "" {
return http.StatusProxyAuthRequired, fmt.Errorf(http.StatusText(http.StatusProxyAuthRequired))
return http.StatusProxyAuthRequired, fmt.Errorf("%s", http.StatusText(http.StatusProxyAuthRequired))
}

enc := strings.TrimPrefix(auth, "Basic ")
Expand Down Expand Up @@ -134,14 +134,14 @@ func (s *HTTPServer) serve(conn net.Conn) {
defer conn.Close()
defer peer.Close()

io.Copy(conn, peer)
_, _ = io.Copy(conn, peer)
}()

go func() {
defer conn.Close()
defer peer.Close()

io.Copy(peer, conn)
_, _ = io.Copy(peer, conn)
}()
}

Expand Down

0 comments on commit e402177

Please sign in to comment.