Getting started with GoLang!
Jan 6, 2021
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
- Make a new folder on your desktop “go-go”
- Open it in Visual Studio (or any other text editor) and create a page “main.go”
- 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 🤗