cmd/gofmt: -r strips some comments when pattern matching #57574
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yup, tried gofmt built from 9955a7e
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
input file:
command and result:
Note how the comment was replaced with a blank line.
This doesn't happen when not doing matching i.e.
the code is rewritten and the comment is kept
The text was updated successfully, but these errors were encountered: