You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'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.
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: