Skip to content

Commit

Permalink
Merge pull request #130 from boinkor-net/fix-lints
Browse files Browse the repository at this point in the history
Rename network & address to _ as they're unused
  • Loading branch information
antifuchs authored Apr 28, 2024
2 parents 569492a + e654811 commit 3379f8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,15 @@ func (s *ValidTailnetSrv) Run(ctx context.Context) error {
}
if s.UpstreamTCPAddr != "" {
dialOrig := dial
dial = func(ctx context.Context, network, address string) (net.Conn, error) {
dial = func(ctx context.Context, _, _ string) (net.Conn, error) {
conn, err := dialOrig(ctx, "tcp", s.UpstreamTCPAddr)
if err != nil {
return nil, fmt.Errorf("connecting to tcp %v: %w", s.UpstreamTCPAddr, err)
}
return conn, nil
}
} else if s.UpstreamUnixAddr != "" {
dial = func(ctx context.Context, network, address string) (net.Conn, error) {
dial = func(ctx context.Context, _, _ string) (net.Conn, error) {
d := net.Dialer{}
conn, err := d.DialContext(ctx, "unix", s.UpstreamUnixAddr)
if err != nil {
Expand Down

0 comments on commit 3379f8c

Please sign in to comment.