在Go中可以使用ldflags设置未分配的整数吗?

I know there are several ways of accomplishing this with just a little extra code, but it got me curious... Is there a way to set an unassigned integer in a Go application using ldflags? For instance, could you call...

go build -ldflags "-X main.CurrentEnvironment 1"

And have it set:

package main

var CurrentEnvironment int

func main() {

    ...

}

I couldn't find any documentation supporting this so I presume the answer is no but maybe there's a way.

You can use the -X flag to set a string value only (docs). You could then convert it to an int in your main function with Atoi.