From 287414bc6538c56b40ad8a2620183d1317537987 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Thu, 18 May 2023 00:04:50 +0800 Subject: [PATCH] collector: fix comment and remove redundant parentheses (#2691) Signed-off-by: cui fliter --- collector/device_filter.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collector/device_filter.go b/collector/device_filter.go index 3e4bb5fe..d8a38a29 100644 --- a/collector/device_filter.go +++ b/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)) }