mirror of
https://github.com/moby/moby.git
synced 2026-07-08 15:48:52 +00:00
These are no longer needed as these are now part of a module. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
12 lines
186 B
Go
12 lines
186 B
Go
package maputil
|
|
|
|
func FilterValues[K comparable, V any](in map[K]V, fn func(V) bool) []V {
|
|
var out []V
|
|
for _, v := range in {
|
|
if fn(v) {
|
|
out = append(out, v)
|
|
}
|
|
}
|
|
return out
|
|
}
|