Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmuxq.ExactlyOne

Go
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
tmuxq
Package
github.com/libtmux/libtmux-go/tmux
Source
tmuxq/query.go
ExactlyOne ( values : []T , predicate : func(*T) bool ) → (T, error)
function [source]
function [source]
ExactlyOne

ExactlyOne returns a shallow copy when exactly one source-ordered value is accepted by predicate. It examines values until source exhaustion confirms a sole match, or stops at the second match. It returns the zero value of T with ErrNoMatch for no matches or ErrMultipleMatches for multiple matches; callers can classify either error with errors.Is.

Discussed in Filtering and querying, in practice

0 declared, 0 inherited

Esc

Type to search.