Getting started with GoLang!

Installing Go

Installing Go with Homebrew:

$  brew install golang

To see the installed version of Go run:

$  go version 

To see the which version run:

$  which go

Creating and Compiling an application

  1. Make a new folder on your desktop “go-go”
  2. Open it in Visual Studio (or any other text editor) and create a page “main.go”
  3. Write the following code:
package mainimport "fmt"func main() {fmt.Println("Hello friend! What's your main focus today?")}

Run:

`$ go run main.go` 

Result on terminal:

Hello friend! What's your main focus today?

Follow me for more 🤗

--

--