ncw/gotemplate

Configurable output filename

leighmcculloch opened this issue · 3 comments

I've started using gotemplate and it integrates perfectly with the projects I'm working on, except that the filenames it generates are inconsistent with the other files in my project. I think it could be useful to make that configurable. I'd like to be able to output the files as [type]_generated.go.

@ncw: If you're open to this feature I'd be up for opening a PR for doing it, but would appreciate some direction from you on how you'd prefer it exposed.

ncw commented

I would make a new flag for gotemplate to implement this. The other alternative is annotations in the source, but I think a flag would be the best option here.

A flag sounds like the right approach. I can take a stab at PRing a flag that changes the name?

Looks like this was resolved by #16.