Getting StartedHello, Go (and package main)
All courses

Your first Go program

Every executable starts with package main and a main() function. Import the standard library with import "fmt" and print with fmt.Println.

Quirk: Go formats code with gofmt — tabs for indentation, not spaces. Fight the formatter and lose.

Press Run when output contains Hello, Go.

Output
Press Run to execute your code.