Skip to content

Commit 871084b

Browse files
committed
docs: add comment
1 parent 3f18d74 commit 871084b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/goformat/runner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ func (c *Runner) formatStdIn(path string, stdout io.Writer, in io.Reader) error
171171
}
172172

173173
if match {
174+
// If the file is generated,
175+
// the input should be written to the stdout to avoid emptied the file.
174176
_, err = stdout.Write(input)
175177
if err != nil {
176178
return err

0 commit comments

Comments
 (0)