Skip to main content

Install

https://go.dev/dl/

Verify Installation

go version

Write your first go program

Create a directory and navigate to it
mkdir hello-go && cd hello-go
Create a file named main.go with following code
package main

import "fmt"

func main() {
	fmt.Println("hello go!")
}

Run

go run main.go

Cleanup

Delete the hello-go directory
cd .. && rm -r hello-go