Browse Source

collector: fix comment and remove redundant parentheses (#2691)

Signed-off-by: cui fliter <imcusg@gmail.com>
pull/2694/head
cui fliter 2 years ago committed by GitHub
parent
commit
287414bc65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      collector/device_filter.go

6
collector/device_filter.go

@ -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…
Cancel
Save