I am new to Go
, so correct me if, i am wrong. Since Go
executable are statically linked. So, can i code in windows as well as build it on the same but at the time of deployment if i use Linux (ubuntu)
. So, is it possible to do so or i am missing something here.
It is possible, but a bit more complex than what you describe. Regardless of statically compiling, the Go compiler can generate code from any platform to any platform.
For a quick guide on how to do it, see this article http://dave.cheney.net/2015/03/03/cross-compilation-just-got-a-whole-lot-better-in-go-1-5