mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
c5e6a4b307
Signed-off-by: John Howard <jhoward@microsoft.com>
20 lines
359 B
Go
20 lines
359 B
Go
package runconfig
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
func parseNetMode(netMode string) (NetworkMode, error) {
|
|
parts := strings.Split(netMode, ":")
|
|
switch mode := parts[0]; mode {
|
|
case "default":
|
|
default:
|
|
return "", fmt.Errorf("invalid --net: %s", netMode)
|
|
}
|
|
return NetworkMode(netMode), nil
|
|
}
|
|
|
|
func validateNetMode(vals *validateNM) error {
|
|
return nil
|
|
}
|