We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d79d25 commit 71a3edeCopy full SHA for 71a3ede
pipeline/pipeline.go
@@ -168,7 +168,8 @@ func (ap *ActivePipelines) Contains(n string) bool {
168
// RemoveDeletedPipelines removes the pipelines whose names are NOT
169
// present in `existingPipelineNames` from the given ActivePipelines instance.
170
func (ap *ActivePipelines) RemoveDeletedPipelines(existingPipelineNames []string) {
171
- for i, pipeline := range ap.Pipelines {
+ var index int
172
+ for pipeline := range ap.Iter() {
173
found := false
174
for _, name := range existingPipelineNames {
175
if pipeline.Name == name {
@@ -177,8 +178,9 @@ func (ap *ActivePipelines) RemoveDeletedPipelines(existingPipelineNames []string
177
178
}
179
180
if !found {
- ap.Remove(i)
181
+ ap.Remove(index)
182
183
+ index++
184
185
186
0 commit comments