raw icon indicating copy to clipboard operation
raw copied to clipboard

bolt-rawgen: Please write to a new file

Open tv42 opened this issue 10 years ago • 2 comments

Editing the main source file is just evil. It makes diffs harder to read, it messes with the files open in my editor, and what go generate stuff is out there has already settled into writing new files.

My personal favorite has been to use *.gen.go for generated go source. Stringer (https://godoc.org/golang.org/x/tools/cmd/stringer) seems to use *_string.go, but that's a bit weird to me because it interacts with build tags..

tv42 avatar Jan 17 '15 05:01 tv42

:+1: On this. I think generated files should be separate from the main source.

Would you be open to accepting a PR for this @benbjohnson, or is there a reason this is not currently done?

chrsm avatar Aug 09 '15 21:08 chrsm

Sure, I'd accept a PR. Thanks, @chrsm. :+1:

benbjohnson avatar Aug 10 '15 00:08 benbjohnson