mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-03 17:16:37 +00:00
Check for nil strings and include wrappers around each.
Signed-off-by: matt durham <mattdurham@ppog.org>
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/go-kit/log/level"
|
||||
"github.com/prometheus-community/windows_exporter/pkg/perflib"
|
||||
"github.com/prometheus-community/windows_exporter/pkg/types"
|
||||
"github.com/prometheus-community/windows_exporter/pkg/utils"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
@@ -211,7 +212,7 @@ func (c *collector) Build() error {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if *c.exchangeCollectorsEnabled == "" {
|
||||
if utils.IsEmpty(c.exchangeCollectorsEnabled) {
|
||||
for _, collectorName := range exchangeAllCollectorNames {
|
||||
c.enabledCollectors = append(c.enabledCollectors, collectorName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user