diff --git a/bgp/bgp_metric.go b/bgp/bgp_metric.go index 936c38a..9b9ba9e 100644 --- a/bgp/bgp_metric.go +++ b/bgp/bgp_metric.go @@ -26,8 +26,7 @@ func init() { } func getDesc(prefix string) *desc { - labels := make([]string, 0) - labels = append(labels, "name") + labels := []string{"name"} d := &desc{} d.upDesc = prometheus.NewDesc(prefix+"_session_up", "Protocol is up", labels, nil) diff --git a/ospf/ospf_metric.go b/ospf/ospf_metric.go index a5584f0..6fb0bf6 100644 --- a/ospf/ospf_metric.go +++ b/ospf/ospf_metric.go @@ -27,8 +27,7 @@ func init() { } func getDesc(prefix string) *desc { - labels := make([]string, 0) - labels = append(labels, "name") + labels := []string{"name"} d := &desc{} d.upDesc = prometheus.NewDesc(prefix+"_up", "Protocol is up", labels, nil)