Skip to content

Commit

Permalink
Implement Stringer interface for FilterResult
Browse files Browse the repository at this point in the history
Signed-off-by: Calum Murray <[email protected]>
  • Loading branch information
Cali0707 committed Sep 27, 2023
1 parent aa01692 commit d5395a6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/eventfilter/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ func (x FilterResult) Or(y FilterResult) FilterResult {
return FailFilter
}

func (x FilterResult) String() string {
switch x {
case PassFilter:
return "PassFilter"
case FailFilter:
return "FailFilter"
default:
return "NoFilter"
}
}

// Filter is an interface representing an event filter of the trigger filter
type Filter interface {
// Filter compute the predicate on the provided event and returns the result of the matching
Expand Down

0 comments on commit d5395a6

Please sign in to comment.