Introduction to Go

Hello World in Go

Your First Go Program 🎉

Let's write a simple "Hello, World!" program.

The Code

package main

import "fmt"

func main() {
    fmt.Println("Hello, Go!")
}

Breaking It Down

PartMeaning
package main
Executable package
import "fmt"
Import formatting library
func main()
Entry point function
fmt.Println
Print with newline
Visualizer
$ go run main.go
Hello, Go!

Interactive Visualization

go
Loading...
Output
Run execution to see output...