Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 7ea52e7

Browse files
committed
Refactoring: Move removeString function
1 parent 1177bfe commit 7ea52e7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

operator/controllers/execution/scans/scan_controller.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,3 +455,13 @@ func (r *ScanReconciler) updateHookStatus(scan *executionv1.Scan, hookStatus exe
455455
}
456456
return nil
457457
}
458+
459+
func removeString(slice []string, s string) (result []string) {
460+
for _, item := range slice {
461+
if item == s {
462+
continue
463+
}
464+
result = append(result, item)
465+
}
466+
return
467+
}

operator/controllers/execution/scans/utils.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,3 @@ func containsString(slice []string, s string) bool {
99
}
1010
return false
1111
}
12-
13-
func removeString(slice []string, s string) (result []string) {
14-
for _, item := range slice {
15-
if item == s {
16-
continue
17-
}
18-
result = append(result, item)
19-
}
20-
return
21-
}

0 commit comments

Comments
 (0)