From 2c4783ff8b197e778b32558867897fa00ad0bbd8 Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Fri, 10 Mar 2023 16:17:43 +0800 Subject: [PATCH] fix: SA4001 for netDialer copy --- component/dialer/dialer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/component/dialer/dialer.go b/component/dialer/dialer.go index 5ba00e31..b47b9e5b 100644 --- a/component/dialer/dialer.go +++ b/component/dialer/dialer.go @@ -116,7 +116,8 @@ func dialContext(ctx context.Context, network string, destination netip.Addr, po case nil: netDialer = &net.Dialer{} case *net.Dialer: - netDialer = &*netDialer.(*net.Dialer) // make a copy + _netDialer := *netDialer.(*net.Dialer) + netDialer = &_netDialer // make a copy default: return netDialer.DialContext(ctx, network, address) }