Re: [go-nuts] `go test` does not honor -ldflags

2017-06-30 Thread chioyi . tang
Do you know where is this issue documented? I'm facing the same problem now and tried to find more information. Thanks! On Tuesday, October 4, 2016 at 6:47:30 AM UTC-7, Art Mellor wrote: > > Perhaps documenting the behavior is the best quick fix. Not knowing how > 'main' gets altered - is it som

Re: [go-nuts] `go test` does not honor -ldflags

2016-10-04 Thread Art Mellor
Perhaps documenting the behavior is the best quick fix. Not knowing how 'main' gets altered - is it something that is predictable? If so, I don't think it is too terrible to document that so you can alter your command line appropriately. I personally use the feature to pass in build numbers an

Re: [go-nuts] `go test` does not honor -ldflags

2016-10-04 Thread Ian Lance Taylor
On Tue, Oct 4, 2016 at 6:03 AM, Art Mellor wrote: > From a user experience standpoint, I think the "Principle of least > astonishment" would argue it is more of a bug than not > https://en.wikipedia.org/wiki/Principle_of_least_astonishment I can't argue with that. The problem is that the definit

Re: [go-nuts] `go test` does not honor -ldflags

2016-10-04 Thread Art Mellor
>From a user experience standpoint, I think the "Principle of least astonishment" would argue it is more of a bug than not https://en.wikipedia.org/wiki/Principle_of_least_astonishment -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscri

Re: [go-nuts] `go test` does not honor -ldflags

2016-10-03 Thread Ian Lance Taylor
On Mon, Oct 3, 2016 at 4:08 PM, wrote: > > Please see the code of main.go and main_test.go pasted at the end. Then > consider the output of these commands. I would have expected the `go test` > command's output to contain the value 'hello'. From `go help test` output, > the `go test` command is s

[go-nuts] `go test` does not honor -ldflags

2016-10-03 Thread singh . gurjeet
Please see the code of main.go and main_test.go pasted at the end. Then consider the output of these commands. I would have expected the `go test` command's output to contain the value 'hello'. From `go help test` output, the `go test` command is supposed to honor all build flags, but clearly i