Skip to content

Commit

Permalink
Rename checks iterator to CheckRequests()
Browse files Browse the repository at this point in the history
To avoid hiding the CheckRequests.Checks field.
  • Loading branch information
ronenh committed Dec 20, 2024
1 parent 6a3d036 commit 22058cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions safe/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func Checks(i *dsr3.ChecksRequest) *SafeChecks {
return &SafeChecks{i}
}

// Checks returns an iterator that materializes all checks in order.
func (c *SafeChecks) Checks() iter.Seq[SafeCheck] {
// CheckRequests returns an iterator that materializes all checks in order.
func (c *SafeChecks) CheckRequests() iter.Seq[SafeCheck] {
return func(yield func(SafeCheck) bool) {
defaults := &dsc3.RelationIdentifier{
ObjectType: c.Default.ObjectType,
Expand All @@ -26,7 +26,7 @@ func (c *SafeChecks) Checks() iter.Seq[SafeCheck] {
SubjectId: c.Default.SubjectId,
}

for _, check := range c.ChecksRequest.Checks {
for _, check := range c.Checks {
req := &dsr3.CheckRequest{
ObjectType: fallback(check.ObjectType, defaults.ObjectType),
ObjectId: fallback(check.ObjectId, defaults.ObjectId),
Expand Down

0 comments on commit 22058cc

Please sign in to comment.