Skip to content

Commit

Permalink
chore: clarify why visit it called before iterating
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenh committed Nov 22, 2024
1 parent 2b991b1 commit 10f341e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wait/walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func walk(root *Strategy, visit VisitFunc) error {
return nil
}

// Allow the visit function to customize the behaviour of the walk before visiting the children.
if err := visit(*root); err != nil {
if errors.Is(err, VisitRemove) {
*root = nil
Expand Down

0 comments on commit 10f341e

Please sign in to comment.