Skip to content

Commit

Permalink
Clarify object vs review
Browse files Browse the repository at this point in the history
Signed-off-by: Will Beason <willbeason@google.com>
  • Loading branch information
Will Beason committed Jan 12, 2022
1 parent 6d2e972 commit b3bed95
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions constraint/pkg/core/constraints/constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ func SemanticEqual(c1 *unstructured.Unstructured, c2 *unstructured.Unstructured)
return reflect.DeepEqual(s1, s2)
}

// Matcher matches objects.
// Matcher matches object review requests.
type Matcher interface {
Match(obj interface{}) (bool, error)
// Match returns true if the Matcher's Constraint should run against the
// passed review object.
// Note that this is the review object returned by HandleReview.
Match(review interface{}) (bool, error)
}

0 comments on commit b3bed95

Please sign in to comment.