Skip to content

Commit

Permalink
internal/config: add missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
seilagamo committed Feb 12, 2025
1 parent 0a760ae commit 7ef5f0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/config/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@ func (d *DAG) getVertexID(s string) string {
return ""
}

// WalkFunc represents a function that implements a visitor.
type WalkFunc func(vertexID string, vertex interface{})

// Visit executes the visitor function.
func (fn WalkFunc) Visit(v hdag.Vertexer) {
fn(v.Vertex())
}

// DFSWalk walks the [DAG] using a depth first strategy.
func (d *DAG) DFSWalk(fn WalkFunc) {
d.dag.DFSWalk(fn)
}

0 comments on commit 7ef5f0c

Please sign in to comment.