netdev: clean zero-value assignments
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
92ea3c6a3f
commit
84c6446094
|
@ -50,12 +50,12 @@ func NewNetDevCollector(logger log.Logger) (Collector, error) {
|
||||||
return nil, errors.New("device-blacklist & accept-devices are mutually exclusive")
|
return nil, errors.New("device-blacklist & accept-devices are mutually exclusive")
|
||||||
}
|
}
|
||||||
|
|
||||||
var ignorePattern *regexp.Regexp = nil
|
var ignorePattern *regexp.Regexp
|
||||||
if *netdevIgnoredDevices != "" {
|
if *netdevIgnoredDevices != "" {
|
||||||
ignorePattern = regexp.MustCompile(*netdevIgnoredDevices)
|
ignorePattern = regexp.MustCompile(*netdevIgnoredDevices)
|
||||||
}
|
}
|
||||||
|
|
||||||
var acceptPattern *regexp.Regexp = nil
|
var acceptPattern *regexp.Regexp
|
||||||
if *netdevAcceptDevices != "" {
|
if *netdevAcceptDevices != "" {
|
||||||
acceptPattern = regexp.MustCompile(*netdevAcceptDevices)
|
acceptPattern = regexp.MustCompile(*netdevAcceptDevices)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue