烂翻译系列之Golang新手入门——下载和安装

Download and install Go quickly with the steps described here.

按照这里说明的步骤可以快速地下载和安装Go。

For other content on installing, you might be interested in:

你可能对安装的其它方面感兴趣:

  • Managing Go installations -- How to install multiple versions and uninstall.  管理Go安装——如何安装和卸载多个版本。
  • Installing Go from source -- How to check out the sources, build them on your own machine, and run them.  从源码安装Go——如何检出源码,在你的计算机上构建它们并运行它们。

1. Go download.  下载Go

Click the button below to download the Go installer.

点击下方的链接来下载Go的安装包。

Download Go for Windowsgo1.17.6.windows-amd64.msi (124 MB)

Don't see your operating system here? Try one of the other downloads.

在这里找不到与你的操作系统对应的安装包?请尝试点击其它下载

Note: By default, the go command downloads and authenticates modules using the Go module mirror and Go checksum database run by Google. Learn more.

注意:默认情况下,go命令使用谷歌运行的Go模块镜像和Go校验和数据库来下载和验证模块。了解更多。

2. Go install.  Windows上安装Go

  1. Open the MSI file you downloaded and follow the prompts to install Go.  打开下载的MSI文件并按照提示安装Go。

    By default, the installer will install Go to Program Files or Program Files (x86). You can change the location as needed. After installing, you will need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt.  默认情况下,安装包会将Go安装到Program Files 或 Program Files (x86)下。若需要,你可以修改安装路径。安装完成后,你需要关闭并重新打开命令行提示符,将安装包对环境变量的修改体现到命令行提示符。

  2. Verify that you've installed Go.  检验是否正确安装了Go
    1. In Windows, click the Start menu.  在Windows中,点击启动菜单。
    2. In the menu's search box, type cmd, then press the Enter key.  在菜单的搜索框中,输入cmd,然后按下回车键。
    3. In the Command Prompt window that appears, type the following command:  在打开的命令行提示符窗口中,键入以下命令:
      $ go version
    4. Confirm that the command prints the installed version of Go.  确认命令打印的Go安装版本。

3. Go code.  Go编码

You're set up! Visit the Getting Started tutorial to write some simple Go code. It takes about 10 minutes to complete.

一切正常!访问入门教程编写一些简单Go代码。完成大概需要十分钟。

posted @ 2022-01-07 16:50  菜鸟吊思  阅读(417)  评论(0)    收藏  举报