From e654811791359fe68d480040f98f2429c3db85d5 Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Sun, 28 Apr 2024 10:54:42 -0400 Subject: [PATCH] Rename network & address to _ as they're unused This makes the unused-parameter linter happy. --- cli.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli.go b/cli.go index 2151f97..2b7d8cf 100644 --- a/cli.go +++ b/cli.go @@ -238,7 +238,7 @@ 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) @@ -246,7 +246,7 @@ func (s *ValidTailnetSrv) Run(ctx context.Context) error { 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 {