# tmuxq.Matching

- **Module:** tmuxq
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmuxq/filter.go#L20
- **Page:** https://libtmux.org/en/go/latest/reference/tmuxq-matching/

```
tmuxq.Matching(values: []T, filter: Filter[T]) -> ([]T, error)
```

Matching returns a fresh slice of shallow copies for values that filter accepts, retaining their source order, and reports the one error a filter can have rather than leaving it for the caller to unpack first. It evaluates every input value, so a no-match result is an empty slice.

active, err := tmuxq.Matching(snapshot.Panes(), tmux.PaneActiveIs(true))
