vendor: update compose-go to v2.0.0-rc.8

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-02-24 16:47:40 +01:00
parent 545a5c97c6
commit 95185e9525
36 changed files with 1185 additions and 496 deletions

View File

@ -51,3 +51,18 @@ func ArrayContains[T comparable](source []T, toCheck []T) bool {
}
return true
}
func RemoveDuplicates[T comparable](slice []T) []T {
// Create a map to store unique elements
seen := make(map[T]bool)
result := []T{}
// Loop through the slice, adding elements to the map if they haven't been seen before
for _, val := range slice {
if _, ok := seen[val]; !ok {
seen[val] = true
result = append(result, val)
}
}
return result
}