-
Notifications
You must be signed in to change notification settings - Fork 111
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
Allow wsdlgen to take build tags #106
Comments
This is a good idea. I'm happy to accept a PR. You might want to take a look at GenAST: Lines 229 to 230 in 73105c9
file.Comments , I think.
Alternatively you could do this just by modifying the string produced in |
I've been surveying how other tools do it and it seems that most of them just output the string directly instead of trying to deal with the AST. That's what I did in #107 and that's what I plan to do for this one as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A useful feature of go-bindata is its ability to take an argument with go build tags to add to the generated file.
My specific use-case for this is that I have two WSDL files - one from the production server and the other from the staging server, each with its hard-coded server URL in it.
I would like to be able to use
go generate
like this:I tried to do it like this, but it doesn't work:
The reason it doesn't work is that whitespace matters. There must be a blank line between the build flags and the
package
declaration, as noted here.I would be happy to submit a PR for this if you are interested.
The text was updated successfully, but these errors were encountered: