You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just to be clear, I'm not 100% sure goimports is the cause of the issue here; just logging a report with a best-efforts set of repro steps in case others see something similar.
-trace takes an argument, the name of the trace file to write. So you asked it to write a trace file to main.go, fix the imports of stdin, and then killed it before giving it any code on stdin to format.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Using
goimports
as of https://go-review.googlesource.com/c/tools/+/142697, specifically patch set 5:Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
goimports
was "hanging" on this input file so I switched out of my editor and ran this sequence of commands:This last call ran very fast; too fast because
main.go
had, by this point, been truncated to zero length.Unfortunately I can't provide a precise repo because the contents of the truncated file have been lost 😄
What did you expect to see?
The input file not to be truncated; no
-w
flag was provided.What did you see instead?
Per above.
cc @ianthehat @heschik
The text was updated successfully, but these errors were encountered: