go env

go env -u NAME 可以把 go env -w NAME=VALUE设置的环境变量给重置

具体可以通过 go help env查看

$ go help env
usage: go env [-json] [-u] [-w] [var ...]

Env prints Go environment information.

By default env prints information as a shell script
(on Windows, a batch file). If one or more variable
names is given as arguments, env prints the value of
each named variable on its own line.

The -json flag prints the environment in JSON format
instead of as a shell script.

The -u flag requires one or more arguments and unsets
the default setting for the named environment variables,
if one has been set with 'go env -w'.

The -w flag requires one or more arguments of the
form NAME=VALUE and changes the default settings
of the named environment variables to the given values.

For more about environment variables, see 'go help environment'.

翻译:

用法:去 env [-json] [-u] [-w] [var ...]

Env 打印 Go 环境信息。

默认情况下,env 将信息打印为 shell 脚本
(在 Windows 上,一个批处理文件)。 如果一个或多个变量
名称作为参数给出, env 打印的值
每个命名变量都在自己的行上。

-json 标志以 JSON 格式打印环境
而不是作为 shell 脚本。

-u 标志需要一个或多个参数并取消设置
命名环境变量的默认设置,
如果已经设置了“go env -w”。

-w 标志需要一个或多个参数
形成 NAME=VALUE 并更改默认设置
命名环境变量的给定值。

有关环境变量的更多信息,请参阅“go help environment”。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值