Added specific installation instructions for Mac (#2011)

Made it more clear for Mac users using Go version 1.8 and greater.
This commit is contained in:
Jim Filippou 2019-09-05 16:50:54 +03:00 committed by thinkerou
parent 1acb3fb30a
commit b80d675864

View File

@ -101,6 +101,12 @@ $ go get github.com/kardianos/govendor
$ mkdir -p $GOPATH/src/github.com/myusername/project && cd "$_" $ mkdir -p $GOPATH/src/github.com/myusername/project && cd "$_"
``` ```
If you are on a Mac and you're installing Go 1.8 (released: Feb 2017) or later, GOPATH is automatically determined by the Go toolchain for you. It defaults to $HOME/go on macOS so you can create your project like this
```sh
$ mkdir -p $HOME/go/src/github.com/myusername/project && cd "$_"
```
3. Vendor init your project and add gin 3. Vendor init your project and add gin
```sh ```sh