From bd6a7f1764e0560b7ef4a4652a7e667cf663ec4f Mon Sep 17 00:00:00 2001 From: Inanc Gumus Date: Tue, 23 Mar 2021 18:04:48 +0300 Subject: [PATCH] update: gopath removed from the first directory exercises etc --- first/first/exercises/02/exercise.md | 7 ------ first/first/exercises/02/solution/solution.md | 3 --- first/first/main.go | 2 +- ...> 01-code-your-first-program-questions.md} | 0 first/first/questions/01-gopath-questions.md | 19 ---------------- ...=> 02-run-your-first-program-questions.md} | 22 ------------------- 6 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 first/first/exercises/02/exercise.md delete mode 100644 first/first/exercises/02/solution/solution.md rename first/first/questions/{02-code-your-first-program-questions.md => 01-code-your-first-program-questions.md} (100%) delete mode 100644 first/first/questions/01-gopath-questions.md rename first/first/questions/{03-run-your-first-program-questions.md => 02-run-your-first-program-questions.md} (70%) diff --git a/first/first/exercises/02/exercise.md b/first/first/exercises/02/exercise.md deleted file mode 100644 index 71d1d82..0000000 --- a/first/first/exercises/02/exercise.md +++ /dev/null @@ -1,7 +0,0 @@ -// --------------------------------------------------------- -// EXERCISE -// Print your GOPATH using the `go env` tool -// -// EXPECTED OUTPUT -// The physical folder path that is referenced by $GOPATH -// --------------------------------------------------------- diff --git a/first/first/exercises/02/solution/solution.md b/first/first/exercises/02/solution/solution.md deleted file mode 100644 index 4176bbd..0000000 --- a/first/first/exercises/02/solution/solution.md +++ /dev/null @@ -1,3 +0,0 @@ -You should type this: - -go env GOPATH \ No newline at end of file diff --git a/first/first/main.go b/first/first/main.go index c312452..f2b7b37 100644 --- a/first/first/main.go +++ b/first/first/main.go @@ -34,7 +34,7 @@ func main() { // Println function of "fmt" package becomes available // 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 // "fmt" package diff --git a/first/first/questions/02-code-your-first-program-questions.md b/first/first/questions/01-code-your-first-program-questions.md similarity index 100% rename from first/first/questions/02-code-your-first-program-questions.md rename to first/first/questions/01-code-your-first-program-questions.md diff --git a/first/first/questions/01-gopath-questions.md b/first/first/questions/01-gopath-questions.md deleted file mode 100644 index 7904067..0000000 --- a/first/first/questions/01-gopath-questions.md +++ /dev/null @@ -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 \ No newline at end of file diff --git a/first/first/questions/03-run-your-first-program-questions.md b/first/first/questions/02-run-your-first-program-questions.md similarity index 70% rename from first/first/questions/03-run-your-first-program-questions.md rename to first/first/questions/02-run-your-first-program-questions.md index 59ca9b6..79c5d33 100644 --- a/first/first/questions/03-run-your-first-program-questions.md +++ b/first/first/questions/02-run-your-first-program-questions.md @@ -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? 1. It happens when your program starts running on a computer *CORRECT* 2. It happens while your program is being compiled