Provisioning: bulk move by name (#108869)
* Add ResourceRef to move job spec * Implement move by name * Use map to struct
This commit is contained in:
@@ -167,12 +167,12 @@ func deduplicatePaths(paths []string) []string {
|
||||
return paths
|
||||
}
|
||||
|
||||
seen := make(map[string]bool, len(paths))
|
||||
seen := make(map[string]struct{}, len(paths))
|
||||
result := make([]string, 0, len(paths))
|
||||
|
||||
for _, path := range paths {
|
||||
if !seen[path] {
|
||||
seen[path] = true
|
||||
if _, exists := seen[path]; !exists {
|
||||
seen[path] = struct{}{}
|
||||
result = append(result, path)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user