allpass.go 451 B

1234567891011
  1. package matcher
  2. // AllPass is a filter that matches everything and is the same as no filter. It is implemented here as a guard
  3. // against universal operations occurring in the absence of filters.
  4. type AllPass[T any] struct{}
  5. func (n *AllPass[T]) String() string { return "(AllPass)" }
  6. // Matches is the canonical in-Go function for determining if T
  7. // matches a specific implementation's rules.
  8. func (n *AllPass[T]) Matches(T) bool { return true }