1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/runconfig/hostconfig_windows.go
Vincent Demeester 5170a2c096 Lint fixes on runconfig
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-27 21:23:15 +02:00

20 lines
479 B
Go

package runconfig
// IsDefault indicates whether container uses the default network stack.
func (n NetworkMode) IsDefault() bool {
return n == "default"
}
// DefaultDaemonNetworkMode returns the default network stack the daemon should
// use.
func DefaultDaemonNetworkMode() NetworkMode {
return NetworkMode("default")
}
// NetworkName returns the name of the network stack.
func (n NetworkMode) NetworkName() string {
if n.IsDefault() {
return "default"
}
return ""
}