github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/break/predicate/always/api.go (about)

     1  // Package always provides constant predicate implementations
     2  package always
     3  
     4  // True always return true
     5  func True[T any](_ T) (bool, error) {
     6  	return true, nil
     7  }
     8  
     9  // False always return false
    10  func False[T any](_ T) (bool, error) {
    11  	return false, nil
    12  }