mergeFiles appends src files into dst, deduplicating by path.
(dst, src []taskcontext.FileEntry)
| 126 | |
| 127 | // mergeFiles appends src files into dst, deduplicating by path. |
| 128 | func mergeFiles(dst, src []taskcontext.FileEntry) []taskcontext.FileEntry { |
| 129 | seen := make(map[string]bool, len(dst)) |
| 130 | for _, f := range dst { |
| 131 | seen[f.Path] = true |
| 132 | } |
| 133 | for _, f := range src { |
| 134 | if seen[f.Path] { |
| 135 | continue |
| 136 | } |
| 137 | seen[f.Path] = true |
| 138 | dst = append(dst, f) |
| 139 | } |
| 140 | return dst |
| 141 | } |
| 142 | |
| 143 | // addDependencyEntries populates the Dependencies field on the result. |
| 144 | func addDependencyEntries(task *model.Task, allTasks []*model.Task, result *taskcontext.Result) { |
no outgoing calls
no test coverage detected