allcut.go 511 B

12345678910111213
  1. package matcher
  2. // AllCut is a matcher that matches nothing. This is useful
  3. // for applications like authorization, where a user/group/role may be disallowed
  4. // from viewing data entirely.
  5. type AllCut[T any] struct{}
  6. // String returns the string representation of the matcher instance
  7. func (ac *AllCut[T]) String() string { return "(AllCut)" }
  8. // Matches is the canonical in-Go function for determining if T
  9. // matches a specific implementation's rules.
  10. func (ac *AllCut[T]) Matches(T) bool { return false }