mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 12:30:46 +01: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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignores returns whether the device should be ignored
|
// ignored returns whether the device should be ignored
|
||||||
func (f *deviceFilter) ignored(name string) bool {
|
func (f *deviceFilter) ignored(name string) bool {
|
||||||
return ((f.ignorePattern != nil && f.ignorePattern.MatchString(name)) ||
|
return (f.ignorePattern != nil && f.ignorePattern.MatchString(name)) ||
|
||||||
(f.acceptPattern != nil && !f.acceptPattern.MatchString(name)))
|
(f.acceptPattern != nil && !f.acceptPattern.MatchString(name))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user