GOOS="windows" GOARCH="amd64" go build
However till now golang's debug functionality seems far from okay. During debug you cannot print map objects.
And also from debugging related aspects, tool dlv does not support arm arch.
Using an undefined variable can be assigned from function return, or by define.
// The following defines a,b,ca, b, _ := func()var c = 1+2
According to and by go tool link --help, compile statically using:
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' .
compiling without debug info using: -ldflags '-s -w'