NetworkMode return the network mode for the network option
()
| 137 | |
| 138 | // NetworkMode return the network mode for the network option |
| 139 | func (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 | |
| 148 | func parseDriverOpt(driverOpt string) (string, string, error) { |
| 149 | // TODO(thaJeztah): these options should not be case-insensitive. |
no test coverage detected