Skip to content

Commit 52fc30c

Browse files
committed
Switch to DialContext() to address lint issue
1 parent f5fe52c commit 52fc30c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exporter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ func registerCollector(logger *slog.Logger, transport *http.Transport,
231231
}
232232

233233
transport.DialContext = func(_ context.Context, _, _ string) (net.Conn, error) {
234-
return net.Dial("unix", socketPath)
234+
d := &net.Dialer{}
235+
return d.DialContext(context.Background(), "unix", socketPath)
235236
}
236237
addr = "http://unix" + requestPath
237238
}

0 commit comments

Comments
 (0)