Fix grammar and typos for section "GOPATH and project settings" in

13.1.md
This commit is contained in:
Anchor
2015-01-11 22:36:51 -08:00
committed by James Miranda
parent 8d4fd07e52
commit 12f2a5f81a

View File

@@ -4,15 +4,15 @@ Anything you intend to do well must first be planned well. In our case, our inte
## GOPATH and project settings
Assuming that the file system specified GOPATH ordinary directory name, of course, we can easily set up a directory name, then its path into GOPATH. GOPATH described earlier can be multiple directories: set the environment variable in the window system ; in linux/MacOS system as long as the input terminal command `export gopath =/home/astaxie/gopath`, but must ensure that GOPATH the code below three directories pkg directory, bin, src. New Project source code in src directory, now tentatively our blog directory called beeblog, the following is in the window environment variables and directory structure screenshot:
Let's proceed by assuming that our GOPATH points to a folder with with an ordinary directory name (if not, we can easily set up a suitable directory and set its path as the GOPATH). As we've describe earlier, a GOPATH can contain more than one directory: in Windows, we can set this as an environment variable; in linux/OSX systems, GOPATH can be set using `export`, i.e: `export gopath=/path/to/your/directory`, as long as the directory which GOPATH points to contains the three sub-directories: `pkg`, `bin` and `src`. Below, we've placed the source code of our new project in the `src` directory with the tentative name `beelog`. Here are some screenshots of the Windows environment variables as well as of the directory structure.
![](images/13.1.gopath.png?raw=true)
Figure 13.1 GOPATH setting environment variables
Figure 13.1 Setting the GOPATH environment variable
![](images/13.1.gopath2.png?raw=true)
Figure 13.2 working directory in $ gopath/src under
Figure 13.2 The working directory under $gopath/src
## Application flowchart