if i = strings.Index(arg, "="); i < 0 {
base.Fatalf("go mod: -replace=%s: need old@v=new[@v] (missing =)", arg)
}
- old, new := strings.TrimSpace(arg[:i]), strings.TrimSpace(arg[i+2:])
+ old, new := strings.TrimSpace(arg[:i]), strings.TrimSpace(arg[i+1:])
if strings.HasPrefix(new, ">") {
base.Fatalf("go mod: -replace=%s: separator between old and new is =, not =>", arg)
}
"-droprequire=x.2",
"-exclude=x.1 @ v1.2.0",
"-exclude=x.1@v1.2.1",
- "-replace=x.1@v1.3.0=>y.1@v1.4.0",
- "-replace=x.1@v1.4.0 => ../z",
+ "-replace=x.1@v1.3.0=y.1@v1.4.0",
+ "-replace=x.1@v1.4.0 = ../z",
)
mustHaveGoMod(`module x.x/y/z
}
tg.run("mod",
- "-replace=x.1@v1.3.0=>y.1/v2@v2.3.5",
- "-replace=x.1@v1.4.0=>y.1/v2@v2.3.5",
+ "-replace=x.1@v1.3.0=y.1/v2@v2.3.5",
+ "-replace=x.1@v1.4.0=y.1/v2@v2.3.5",
)
mustHaveGoMod(`module x.x/y/z
require x.3 v1.99.0
`)
tg.run("mod",
- "-replace=x.1=>y.1/v2@v2.3.6",
+ "-replace=x.1=y.1/v2@v2.3.6",
)
mustHaveGoMod(`module x.x/y/z