Static linking in GO 1.5:
go build -ldflags "-extldflags -static" ...
Static linking in GO >= 1.6:
go build -ldflags "-linkmode external -extldflags -static" ...
Static linking in GO 1.5:
go build -ldflags "-extldflags -static" ...
Static linking in GO >= 1.6:
go build -ldflags "-linkmode external -extldflags -static" ...