Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove nolint from source code and replace with blank identifiers #142

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions agent/tcpproxy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,12 @@ func forward(conn1 net.Conn, conn2 net.Conn) {
go func() {
defer wg.Done()
defer conn1.Close()
// nolint
io.Copy(conn1, conn2)
_, _ = io.Copy(conn1, conn2)
}()
go func() {
defer wg.Done()
defer conn2.Close()
// nolint
io.Copy(conn2, conn1)
_, _ = io.Copy(conn2, conn1)
}()
wg.Wait()
}
6 changes: 2 additions & 4 deletions client/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,13 @@ func (f *Forwarder) forward(downstream net.Conn) {
go func() {
defer g.Done()
defer downstream.Close()
// nolint
io.Copy(downstream, upstream)
_, _ = io.Copy(downstream, upstream)
}()

go func() {
defer g.Done()
defer upstream.Close()
// nolint
io.Copy(upstream, downstream)
_, _ = io.Copy(upstream, downstream)
}()

g.Wait()
Expand Down
6 changes: 2 additions & 4 deletions forward/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,12 @@ func (f *Forwarder) forwardConn(conn net.Conn) {
go func() {
defer g.Done()
defer conn.Close()
// nolint
io.Copy(conn, upstream)
_, _ = io.Copy(conn, upstream)
}()
go func() {
defer g.Done()
defer upstream.Close()
// nolint
io.Copy(upstream, conn)
_, _ = io.Copy(upstream, conn)
}()
g.Wait()
}
6 changes: 2 additions & 4 deletions server/proxy/tcpproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@ func forward(conn1 net.Conn, conn2 net.Conn) {
go func() {
defer wg.Done()
defer conn1.Close()
// nolint
io.Copy(conn1, conn2)
_, _ = io.Copy(conn1, conn2)
}()
go func() {
defer wg.Done()
defer conn2.Close()
// nolint
io.Copy(conn2, conn1)
_, _ = io.Copy(conn2, conn1)
}()
wg.Wait()
}
Loading