diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-08 21:59:10 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-08 21:59:10 +0300 |
| commit | 103f369cee209f6f0a15ef953cff138ffa025a26 (patch) | |
| tree | ba9ee209acab34726fc1d43753aee18bc98a46d0 /internal/ui/table.go | |
| parent | bcfeb2deb2fc089c81971744774095409ad12a43 (diff) | |
task b: protect regex cache with RWMutex
Diffstat (limited to 'internal/ui/table.go')
| -rw-r--r-- | internal/ui/table.go | 2 |
1 files changed, 2 insertions, 0 deletions
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 { |
