diff --git a/app/vmagent/remotewrite/statconn.go b/app/vmagent/remotewrite/statconn.go index 7b15f39414..e99a5b15e0 100644 --- a/app/vmagent/remotewrite/statconn.go +++ b/app/vmagent/remotewrite/statconn.go @@ -9,8 +9,8 @@ import ( "github.com/VictoriaMetrics/metrics" ) -func statDial(network, addr string) (conn net.Conn, err error) { - network = netutil.GetTCPNetwork() +func statDial(network_, addr string) (conn net.Conn, err error) { + network := netutil.GetTCPNetwork() conn, err = net.DialTimeout(network, addr, 5*time.Second) dialsTotal.Inc() if err != nil { diff --git a/lib/promscrape/statconn.go b/lib/promscrape/statconn.go index 5635be081c..84e50dfaa8 100644 --- a/lib/promscrape/statconn.go +++ b/lib/promscrape/statconn.go @@ -15,9 +15,9 @@ import ( "github.com/VictoriaMetrics/metrics" ) -func statStdDial(ctx context.Context, network, addr string) (net.Conn, error) { +func statStdDial(ctx context.Context, network_, addr string) (net.Conn, error) { d := getStdDialer() - network = netutil.GetTCPNetwork() + network := netutil.GetTCPNetwork() conn, err := d.DialContext(ctx, network, addr) dialsTotal.Inc() if err != nil {