From 103f369cee209f6f0a15ef953cff138ffa025a26 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 8 Apr 2026 21:59:10 +0300 Subject: task b: protect regex cache with RWMutex --- internal/ui/table.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/ui/table.go') diff --git a/internal/ui/table.go b/internal/ui/table.go index 03c4774..1314eb1 100644 --- a/internal/ui/table.go +++ b/internal/ui/table.go @@ -7,6 +7,7 @@ import ( "regexp" "strconv" "strings" + "sync" "time" "github.com/charmbracelet/x/ansi" @@ -26,6 +27,7 @@ var priorityOptions = []string{"H", "M", "L", ""} var ( urlRegex = regexp.MustCompile(`https?://\S+`) searchRegexCache = make(map[string]*regexp.Regexp, 16) + searchRegexMu sync.RWMutex ) type cellMatch struct { -- cgit v1.2.3