netdev: clean zero-value assignments

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto 2020-01-29 23:14:34 +01:00 committed by Johannes 'fish' Ziemke
parent 92ea3c6a3f
commit 84c6446094
1 changed files with 2 additions and 2 deletions

View File

@ -50,12 +50,12 @@ func NewNetDevCollector(logger log.Logger) (Collector, error) {
return nil, errors.New("device-blacklist & accept-devices are mutually exclusive")
}
var ignorePattern *regexp.Regexp = nil
var ignorePattern *regexp.Regexp
if *netdevIgnoredDevices != "" {
ignorePattern = regexp.MustCompile(*netdevIgnoredDevices)
}
var acceptPattern *regexp.Regexp = nil
var acceptPattern *regexp.Regexp
if *netdevAcceptDevices != "" {
acceptPattern = regexp.MustCompile(*netdevAcceptDevices)
}