build: address gosec warning

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2023-06-02 14:27:12 +02:00 committed by mergify[bot]
parent b9b8392f71
commit 9271375028

View File

@ -24,6 +24,8 @@ func ValidateURL(c *Config) error {
func StartMetricsServer(c *Config) {
addr := net.JoinHostPort(c.MetricsIP, strconv.Itoa(c.MetricsPort))
http.Handle(c.MetricsPath, promhttp.Handler())
//nolint:gosec // TODO: add support for passing timeouts
err := http.ListenAndServe(addr, nil)
if err != nil {
log.FatalLogMsg("failed to listen on address %v: %s", addr, err)