Commit 15fb5694 authored by Lucas Seguinot's avatar Lucas Seguinot

WIP

parent 24239163
Pipeline #6451 failed with stage
in 1 minute and 58 seconds
package watcher
type impactDiff struct {
All []string
Previous map[string]bool
Current map[string]bool
}
func newImpactDiffFromSlices(
previousImpacts []string,
currentImpacts []string,
) impactDiff {
all := []string{}
previous := map[string]bool{}
current := map[string]bool{}
for _, impact := range previousImpacts {
previous[impact] = true
all = append(all, impact)
}
for _, impact := range currentImpacts {
current[impact] = true
if !previous[impact] {
all = append(all, impact)
}
}
return impactDiff{
All: all,
Previous: previous,
Current: current,
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment