diff --git a/cmd/gonew/main.go b/cmd/gonew/main.go index 920d56a1bf6..8830c8b512b 100644 --- a/cmd/gonew/main.go +++ b/cmd/gonew/main.go @@ -150,7 +150,7 @@ func main() { data = fixGo(data, rel, srcMod, dstMod, isRoot) } if rel == "go.mod" { - data = fixGoMod(data, srcMod, dstMod) + data = fixGoMod(data, dstMod) } if err := os.WriteFile(dst, data, 0666); err != nil { @@ -219,7 +219,7 @@ func fixGo(data []byte, file string, srcMod, dstMod string, isRoot bool) []byte // fixGoMod rewrites the go.mod content in data to replace srcMod with dstMod // in the module path. -func fixGoMod(data []byte, srcMod, dstMod string) []byte { +func fixGoMod(data []byte, dstMod string) []byte { f, err := modfile.ParseLax("go.mod", data, nil) if err != nil { log.Fatalf("parsing source module:\n%s", err)