Return Result by value from MatchItem

This commit is contained in:
Junegunn Choi
2026-03-01 15:57:39 +09:00
parent 2db14b4308
commit 8452c78cc8
2 changed files with 16 additions and 17 deletions
+1 -1
View File
@@ -260,7 +260,7 @@ func Run(opts *Options) (int, error) {
return false
}
mutex.Lock()
if result, _, _ := pattern.MatchItem(&item, false, slab); result != nil {
if result, _, _ := pattern.MatchItem(&item, false, slab); result.item != nil {
opts.Printer(transformer(&item))
found = true
}