update: gopath removed from the first directory exercises etc
This commit is contained in:
@ -1,7 +0,0 @@
|
|||||||
// ---------------------------------------------------------
|
|
||||||
// EXERCISE
|
|
||||||
// Print your GOPATH using the `go env` tool
|
|
||||||
//
|
|
||||||
// EXPECTED OUTPUT
|
|
||||||
// The physical folder path that is referenced by $GOPATH
|
|
||||||
// ---------------------------------------------------------
|
|
@ -1,3 +0,0 @@
|
|||||||
You should type this:
|
|
||||||
|
|
||||||
go env GOPATH
|
|
@ -1,19 +0,0 @@
|
|||||||
## Where you should put your Go source code into?
|
|
||||||
* Anywhere on my computer
|
|
||||||
* Under $GOPATH
|
|
||||||
* Under $GOPATH/src *CORRECT*
|
|
||||||
|
|
||||||
## What $GOPATH means?
|
|
||||||
* It's a file for Go runtime
|
|
||||||
* Stores Go source code files and compiled packages
|
|
||||||
* It's a path for gophers to follow
|
|
||||||
|
|
||||||
## Do you need to set your $GOPATH?
|
|
||||||
* Yes
|
|
||||||
* No: It's stored on my desktop
|
|
||||||
* No: It's stored under my user path *CORRECT*
|
|
||||||
|
|
||||||
## How can you print your $GOPATH?
|
|
||||||
* Using `ls` command
|
|
||||||
* Using `go env GOPATH` command *CORRECT*
|
|
||||||
* Using `go environment` command
|
|
@ -9,28 +9,6 @@
|
|||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
## Which directory `go build` puts the compiled code into?
|
|
||||||
1. The same directory where you call `go build` *CORRECT*
|
|
||||||
2. $GOPATH/src directory
|
|
||||||
3. $GOPATH/pkg directory
|
|
||||||
4. Into a temporary directory.
|
|
||||||
|
|
||||||
> **2:** There only lives Go source-code files
|
|
||||||
>
|
|
||||||
>
|
|
||||||
> **3:** Go only puts your code there when you call `go install`.
|
|
||||||
>
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
## Which directory `go run` puts the compiled code into?
|
|
||||||
1. The same directory where you call `go run`
|
|
||||||
2. $GOPATH/src directory
|
|
||||||
3. $GOPATH/pkg directory
|
|
||||||
4. Into a temporary directory. *CORRECT*
|
|
||||||
|
|
||||||
|
|
||||||
## Which one below is true for runtime?
|
## Which one below is true for runtime?
|
||||||
1. It happens when your program starts running on a computer *CORRECT*
|
1. It happens when your program starts running on a computer *CORRECT*
|
||||||
2. It happens while your program is being compiled
|
2. It happens while your program is being compiled
|
Reference in New Issue
Block a user