cmd/gofmt: ignores explicit file arguments not named with ".go" after CL 284138 #45859
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
What version of Go are you using (
go version
)?tip (6d95e5a)
Does this issue reproduce with the latest release?
No.
What did you do?
Run gofmt with an input file not named with ".go".
What did you expect to see?
Format the file, emit to stdout.
What did you see instead?
Emit nothing. No error either. The command succeeded silently.
It seems this is changed in CL https://go-review.googlesource.com/c/go/+/284138 .
The gofmt document ( https://golang.org/cmd/gofmt ) mentions
For "a file" case, it does not clearly require ".go" (also not clearly mention it accepts non-".go" file). Previous versions of gofmt does work with non-".go" files.
cc @mvdan @griesemer @bcmills
The text was updated successfully, but these errors were encountered: