moby/daemon/list_windows.go
Cory Snider e332c41e9d pkg/containerfs: alias ContainerFS to string
Drop the constructor and redundant string() type-casts.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-09-23 16:56:52 -04:00

20 lines
554 B
Go

package daemon // import "github.com/docker/docker/daemon"
import (
"strings"
"github.com/docker/docker/container"
)
// excludeByIsolation is a platform specific helper function to support PS
// filtering by Isolation. This is a Windows-only concept, so is a no-op on Unix.
func excludeByIsolation(container *container.Snapshot, ctx *listContext) iterationAction {
i := strings.ToLower(container.HostConfig.Isolation)
if i == "" {
i = "default"
}
if !ctx.filters.Match("isolation", i) {
return excludeContainer
}
return includeContainer
}