在Mac OSX 10.8.4上,我在哪里可以找到Go安装?

在Mac OSX 10.8.4上,我在哪里可以找到Go安装?

问题描述:

I'm following this online book in my path to learn Go during the weekends.

I've tried running the go help gopath command it just returns example paths and how they relate to each other in packages and source directories - it's doesn't actually say where I can find the go folder.

The book specifically mentions:

First create a new folder where we can store our program. The installer you used in chapter 1 created a folder in your home directory named Go. Create a folder named ~/Go/src/golang-book/chapter2. (Where ~ means your home directory) From the terminal you can do this by entering the following commands:

I used the default installer on the Go homepage, so assume that everything installed in the default folder the installer comes with.

If I cd in terminal to the ~/ folder and then use ls, there is no /Go folder.

How can I find this folder in order to follow the online book properly? I'm assuming he's using this folder structure for a reason and would rather not deviate and learn how packages work, etc.

我正在关注这本在线书是我在周末学习Go的路上。 p>

我尝试运行 go help gopath code>命令 它只是返回示例路径以及它们在软件包和源目录中的相互关系-实际上并没有说我在哪里可以找到go文件夹。 p>

这本书专门提到: p>

首先创建一个新文件夹,我们可以在其中存储程序。 在第1章中使用的 安装程序在您的home 目录中创建了一个名为Go的文件夹。 创建一个名为 〜/ Go / src / golang-book / chapter2的文件夹。 (〜表示您的主目录) 在终端上,您可以通过输入以下命令来完成此操作: p> blockquote>

我在Go主页上使用了默认安装程序, 因此,假设所有安装在安装程序默认文件夹中的东西都随行。 p>

如果我将 cd code>插入终端的〜/ code>文件夹,然后 然后使用 ls code>,没有 / Go code>文件夹。 p>

如何找到此文件夹,以便正确地跟踪在线图书 ? 我假设他出于某种原因使用此文件夹结构,而不希望偏离并了解软件包的工作原理,等等。 p> div>

The instructions say:

Create a folder named ~/Go/src/golang-book/chapter2

I interpret that to mean that YOU create the folder named "~/Go/src/golang-book/chapter2". The installer doesn't create this, but you can.

E.G. in your Terminal:

mkdir ~/Go
mkdir ~/Go/src
mkdir ~/Go/src/golang-book
mkdir ~/Go/src/golang-book/chapter2