1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/list_windows.go
Daniel Nephin 4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00

20 lines
562 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(string(container.HostConfig.Isolation))
if i == "" {
i = "default"
}
if !ctx.filters.Match("isolation", i) {
return excludeContainer
}
return includeContainer
}