2019-05-03 17:29:16 +03:00
|
|
|
## Where should you save your Go source code?
|
2018-10-13 23:30:21 +03:00
|
|
|
* Anywhere on my computer
|
|
|
|
* Under $GOPATH
|
|
|
|
* Under $GOPATH/src *CORRECT*
|
|
|
|
|
2019-05-03 17:29:16 +03:00
|
|
|
## What does $GOPATH mean?
|
2018-10-13 23:30:21 +03:00
|
|
|
* It's a file for Go runtime
|
|
|
|
* Stores Go source code files and compiled packages
|
|
|
|
* It's a path for gophers to follow
|
|
|
|
|
2019-05-03 17:29:16 +03:00
|
|
|
## Do you need to set $GOPATH?
|
2018-10-13 23:30:21 +03:00
|
|
|
* Yes
|
|
|
|
* No: It's stored on my desktop
|
|
|
|
* No: It's stored under my user path *CORRECT*
|
|
|
|
|
2019-05-03 17:29:16 +03:00
|
|
|
## How can you print $GOPATH?
|
2018-10-13 23:30:21 +03:00
|
|
|
* Using `ls` command
|
|
|
|
* Using `go env GOPATH` command *CORRECT*
|
|
|
|
* Using `go environment` command
|