mirror of
https://github.com/docker/compose.git
synced 2026-02-09 01:59:22 +08:00
introduce --no-attach to ignore some service output
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
committed by
Nicolas De loof
parent
8b4ac37f9c
commit
d5e4f00644
@@ -28,3 +28,14 @@ func Contains[T any](origin []T, element T) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// RemoveAll removes all elements from origin slice
|
||||
func RemoveAll[T any](origin []T, elements []T) []T {
|
||||
var filtered []T
|
||||
for _, v := range origin {
|
||||
if !Contains(elements, v) {
|
||||
filtered = append(filtered, v)
|
||||
}
|
||||
}
|
||||
return filtered
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user