mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
build: address gosec
warning
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
b9b8392f71
commit
9271375028
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user