Closed rasky closed 8 years ago
thanks for reporting. It looks like a straightforward fix, yes. I'm flat-stick right now, but I'll get onto it soon. [pull-requests very welcome, though]
@rasky please can you try with this branch: feature/remove-quotes-ldflags .
It seems to work OK, but I think I need to work out how to escape special characters.
The branch is in this PR: https://github.com/laher/goxc/pull/92
Test & confirmed this fixes the problem on Go 1.6 for my setup: https://github.com/jhillyerd/inbucket/blob/1.1.0-rc1/.goxc.json
OK thanks @jhillyerd . I merged that PR, #92
Hello, it looks like ldflags interpolation broke with Go 1.5. The symptom is that the interpolated string is surrounded by single quotes. For instance, I have a command line argument that simply prints the version number, and I get back this:
instead of:
Notice that I verified that the single quotes are actually being inserted in the final binary, so there's nothing happening in the application itself.
I run
goxc -pv VERSION
. Adding some debugging prints to the goxc source code, I got this dump of the command line call:The single quotes are being added in
buildFlags()
. It doesn't seem this was recently changed, so I guess that it's the go binary that modified its behavior. I reproduce the same problem while running goxc on both darwin and linux.The fix appears trivial (remove the quote escaping in buildFlags()) but I was wondering if there's more that misses the eye.