update: gopath removed from the first directory exercises etc

This commit is contained in:
Inanc Gumus
2021-03-23 18:04:48 +03:00
parent 22d1992bc3
commit bd6a7f1764
6 changed files with 1 additions and 52 deletions

View File

@ -1,7 +0,0 @@
// ---------------------------------------------------------
// EXERCISE
// Print your GOPATH using the `go env` tool
//
// EXPECTED OUTPUT
// The physical folder path that is referenced by $GOPATH
// ---------------------------------------------------------

View File

@ -1,3 +0,0 @@
You should type this:
go env GOPATH

View File

@ -34,7 +34,7 @@ func main() {
// Println function of "fmt" package becomes available // Println function of "fmt" package becomes available
// Look at what it looks like by typing in the console: // Look at what it looks like by typing in the console:
// godoc -src fmt Println // go doc -src fmt Println
// Println is just an exported function from // Println is just an exported function from
// "fmt" package // "fmt" package

View File

@ -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

View File

@ -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