cmd/go: go mod edit does not sort resulting go.mod file with multiline replace block #32359
Labels
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
follow-up on #30897 regading
go.mod
sorting (aftergo mod edit
)What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
ran the following command with an existing
go.mod
file that include a multilinereplace
clause:go mod edit -replace='github.com/google/go-github/v25=git.myxyz.com/mirror-github/google--go-github/v25@v25.0.4'
What did you expect to see?
the new replacement added in the existing multiline
replace ( [...] )
block in the sorted orderWhat did you see instead?
The following line appended at the end of the
go.mod
file - therefore not inside the existingreplace
block and not sorted with other entries:replace github.com/google/go-github/v25 => git.myxyz.com/mirror-github/google--go-github/v25 v25.0.4
The text was updated successfully, but these errors were encountered: