Skip to content

Commit

Permalink
Rename network & address to _ as they're unused
Browse files Browse the repository at this point in the history
This makes the unused-parameter linter happy.
  • Loading branch information
antifuchs committed Apr 28, 2024
1 parent 569492a commit e654811
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 e654811

Please sign in to comment.