golang: impressed by its cross compiling possibilities

Posted sansna

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了golang: impressed by its cross compiling possibilities相关的知识,希望对你有一定的参考价值。

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 do not support arm arch.

Using an undefined variable can be assigned from function return, or by define.

// The following defines a,b,c
a, b, _ := func()
var c = 1+2

According to this 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‘

以上是关于golang: impressed by its cross compiling possibilities的主要内容,如果未能解决你的问题,请参考以下文章

golang pipeline_by_running_chan.go

MySQL没有使用SUM中的索引和GROUP BY查询

golang http.client 遇到了 Connection reset by peer 问题

One by one系列一步步学习Golang web框架Gin

我在 impress.js 中学到的小套路

impress.js中文API文档