温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

【环境篇】golang环境变量二三事(二)

发布时间:2020-04-27 11:23:37 来源:网络 阅读:536 作者:wx5e1abbbb0a5e5 栏目:编程语言

继续上篇文章的学习,今天来看看其他的环境变量。

GOEXE

The executable file name suffix (".exe" on Windows, "" on other systems).

编译后的二进制文件后缀,在Windows平台是".exe",在其他平台是""。

GOFLAGS

这个变量看起来比较陌生,用的不多,我们看看文档里是怎么解释的:

A space-separated list of -flag=value settings to apply
to go commands by default, when the given flag is known by
the current command. Each entry must be a standalone flag.
Because the entries are space-separated, flag values must
not contain spaces. Flags listed on the command line
are applied after this list and therefore override it.

这段话大意是说GOFLAGS是个"-flag=value"的命令行参数列表,当执行go命令时,默认会添加这个环境变量里设置的参数。

GOTMPDIR

The directory where the go command will write temporary source files, packages, and binaries.

go命令的产生的源码、包、二进制文件存放的临时文件夹。

GOTOOLDIR

The directory where the go tools (compile, cover, doc, etc...) are installed.

存放go的工具包的路径。

未完待续。下篇主要讲跟cgo有关的环境变量。


欢迎关注我的公众号:onepunchgo,会整理相关的文档和资料。

【环境篇】golang环境变量二三事(二)

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI