From 4180a93b4ad01873725ade1ccb071ab9283cbaf3 Mon Sep 17 00:00:00 2001 From: gutmet Date: Thu, 15 Oct 2020 14:56:43 +0200 Subject: [PATCH] trim filter lines when adding --- drivel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivel.go b/drivel.go index 3b0314f..910377c 100644 --- a/drivel.go +++ b/drivel.go @@ -839,8 +839,8 @@ func setFilters(appDir string) { set := makeHashset() if err == nil { for _, id := range strings.Split(s, "\n") { - if strings.TrimSpace(id) != "" { - set.add(id) + if trimmed := strings.TrimSpace(id); trimmed != "" { + set.add(trimmed) } } }