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

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

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,会整理相关的文档和资料。

image

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值