mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-24 21:24:30 -08:00
collector: fix comment and remove redundant parentheses (#2691)
Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
parent
184a4e0893
commit
287414bc65
|
@ -34,8 +34,8 @@ func newDeviceFilter(ignoredPattern, acceptPattern string) (f deviceFilter) {
|
|||
return
|
||||
}
|
||||
|
||||
// ignores returns whether the device should be ignored
|
||||
// ignored returns whether the device should be ignored
|
||||
func (f *deviceFilter) ignored(name string) bool {
|
||||
return ((f.ignorePattern != nil && f.ignorePattern.MatchString(name)) ||
|
||||
(f.acceptPattern != nil && !f.acceptPattern.MatchString(name)))
|
||||
return (f.ignorePattern != nil && f.ignorePattern.MatchString(name)) ||
|
||||
(f.acceptPattern != nil && !f.acceptPattern.MatchString(name))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue