Yes. I agree that it's correct given the general rules.
On Wednesday, 8 November 2023 at 15:42:25 UTC Jan Mercl wrote:
> On Wed, Nov 8, 2023 at 4:01 PM Stephen Illingworth
> wrote:
>
> > I would have expected the "main.A" string to require the same form. But
> either way, that's the correct solu
On Wed, Nov 8, 2023 at 4:01 PM Stephen Illingworth
wrote:
> I would have expected the "main.A" string to require the same form. But
> either way, that's the correct solution.
It is the correct form. Package main cannot be imported and has a
special import path. Though I don't know where it is d
I would have expected the "main.A" string to require the same form. But
either way, that's the correct solution.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
On Wed, Nov 8, 2023 at 1:35 PM Stephen Illingworth <
stephen.illingwo...@gmail.com> wrote:
>
> Hello,
>
> I'm trying to use the -X ldflag to set a string at compile time. I can do
this successfully if the string is in the main package but it does not work
if the string is in a subpackage.
>
> For i
Hello,
I'm trying to use the -X ldflag to set a string at compile time. I can do
this successfully if the string is in the main package but it does not work
if the string is in a subpackage.
For illustration purposes, I have prepared a simple test project
https://github.com/JetSetIlly/ldfl
Using -ldflags -X, is there a way to set the internal value as the output
of an executable console file?
I've seen examples like this:
"-X main.githash=`git rev-parse HEAD`" (which would put the result of the git
command w/ flags into it)
however, I just can't get it to work (if it's even pos