Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wire: specify output file to generator #192

Closed
myyk opened this issue May 30, 2019 · 2 comments
Closed

wire: specify output file to generator #192

myyk opened this issue May 30, 2019 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@myyk
Copy link

myyk commented May 30, 2019

I would like to be able to generate wire files to something not called wire_gen.go. In my code base the convention for generated files is z_foo.go, so being able to specify the name would give me flexibility without extra commands to move the file after generation each time.

If the generator could be run with an extra argument like -o z_wire.go which would put the file in the same directory as the input wire.go that would work for me.

Other alternatives may be to use something like a --prefix "z_" argument.

@shantuo
Copy link
Contributor

shantuo commented Jun 3, 2019

Thanks @myyk for the feature request! This is definitely useful. However, -o might not be feasible if wire is generating more than one files (when there is injector in the test files). --prefix might be the way to go.

@vangent
Copy link
Contributor

vangent commented Sep 25, 2019

Fixed with PR #213, thanks for the contribution! Use --output_file_prefix.

@vangent vangent closed this as completed Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants