simplify more

pull/9263/head
Sharif Elgamal 2020-09-16 16:39:03 -07:00
parent 14a5b0b264
commit 4a004dd58e
1 changed files with 2 additions and 4 deletions

View File

@ -107,10 +107,8 @@ type Mount struct {
// [rw|ro], [Z], [srhared|rslave|rprivate].
func ParseMountString(spec string) (m Mount, err error) {
f := strings.Split(spec, ":")
var fields []string
if runtime.GOOS != "windows" {
fields = f
} else {
fields := f
if runtime.GOOS == "windows" {
// Recreate the host path that got split above since
// Windows paths look like C:\path
hpath := fmt.Sprintf("%s:%s", f[0], f[1])