MCPcopy Index your code
hub / github.com/docker/cli / NetworkMode

Method NetworkMode

opts/network.go:139–146  ·  view source on GitHub ↗

NetworkMode return the network mode for the network option

()

Source from the content-addressed store, hash-verified

137
138// NetworkMode return the network mode for the network option
139func (n *NetworkOpt) NetworkMode() string {
140 networkIDOrName := "default"
141 netOptVal := n.Value()
142 if len(netOptVal) > 0 {
143 networkIDOrName = netOptVal[0].Target
144 }
145 return networkIDOrName
146}
147
148func parseDriverOpt(driverOpt string) (string, string, error) {
149 // TODO(thaJeztah): these options should not be case-insensitive.

Callers 6

parseFunction · 0.80
parseNetworkOptsFunction · 0.80
applyContainerOptionsFunction · 0.80
validateExternalNetworksFunction · 0.80
convertServiceNetworksFunction · 0.80

Calls 1

ValueMethod · 0.95

Tested by

no test coverage detected