markCriticalPathDependencies recursively marks dependencies on critical path
( taskID string, taskMap map[string]*model.Task, depthMap map[string]int, targetDepth int, criticalPath map[string]bool, )
| 159 | |
| 160 | // markCriticalPathDependencies recursively marks dependencies on critical path |
| 161 | func markCriticalPathDependencies( |
| 162 | taskID string, |
| 163 | taskMap map[string]*model.Task, |
| 164 | depthMap map[string]int, |
| 165 | targetDepth int, |
| 166 | criticalPath map[string]bool, |
| 167 | ) { |
| 168 | task, exists := taskMap[taskID] |
| 169 | if !exists { |
| 170 | return |
| 171 | } |
| 172 | |
| 173 | for _, depID := range task.Dependencies { |
| 174 | if depthMap[depID] == targetDepth-1 { |
| 175 | criticalPath[depID] = true |
| 176 | markCriticalPathDependencies(depID, taskMap, depthMap, targetDepth-1, criticalPath) |
| 177 | } |
| 178 | } |
| 179 | } |
no outgoing calls
no test coverage detected