GO语言运行环境下载、安装、配置图文教程

2020-01-28 12:19:30王旭

README.md— 文件,

robots.txt— 文件,使用robots.txt阻止对网址的访问,详情查看https://support.google.com/webmasters/answer/6062608?hl=zh-Hans

VERSION— 文件,版本信息,用记事本打开

四、设置GO环境变量

官方文档:

If you chose a directory other than c:Go, you must set the GOROOT environment variable to your chosen path.

Add the bin subdirectory of your Go root (for example, c:Gobin) to your PATH environment variable.

Setting environment variables under Windows

Under Windows, you may set environment variables through the "Environment Variables" button on the "Advanced" tab of the "System" control panel. Some versions of Windows provide this control panel through the "Advanced System Settings" option inside the "System" control panel.

具体设置步骤如下(windows 10 企业版):

找到:我的电脑,右键,打开“属性”

image

选择“高级系统设置”

image

弹出以下对话框,选择“高级”标签:

image

点击“环境变量”按钮,弹出变量设置窗口:

image

“新建”系统变量:

image

设置变量名GOROOT,变量值C:Go(安装目录)

修改系统变量Path,添加C:Gobin

image

环境变量设置之后,在命令行中输入go:

image

image

按回车键:

image

如查看version,运行go version

image

五、总结

Go语言安装比较简单,安装成功之后要配置运行环境变量,与java类似。

随后将继续Go语言之旅。