update: cheatshets

This commit is contained in:
Inanc Gumus
2018-10-30 23:32:05 +03:00
parent a06b63d1eb
commit 580a412396
4 changed files with 25 additions and 10 deletions

View File

@ -80,9 +80,23 @@ _See the next page..._
## FIRST PROGRAM
* Under, `~/go/src/github.com/inancgumus/hello`, create a `main.go` file.
* And add the following code to it.
* Then, run it like this: `go run main.go`
* **Create directories:**
* **OS X & Linux (or git bash):**
* Create a new directory:
* `mkdir -p ~/go/src/yourname/hello`
* Go to that directory:
* `cd ~/go/src/yourname/hello`
* **Windows:**
* Create a new directory:
* `mkdir c:\Go\src\yourname\hello`
* Go to that directory:
* `cd c:\Go\src\yourname\hello`
* Create a new `code main.go` file under Visual Studio Code.
* And add the following code to it and save it.
* Then, return back to the command-line.
* Run it like this: `go run main.go`
```go
package main