/ go Public
proposal: cmd/go: 'go mod tidy' should remove stale 'replace' directives #30516
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
I created a
go.modfile with two replaces in separate lines, then run
go mod tidy.
foo3replacement is unused.
What did you expect to see?
A nicely formatted
go.mod. Moreover, I think the unused replace should be removed.
What did you see instead?
The file is unchanged. Also,
go mod edit -fmtdoes not format replaces.
The text was updated successfully, but these errors were encountered: