Your First Go Program

Let's write the classic "Hello, World!" program in Go.

package main

import "fmt"

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

Save this file as main.go and run it with:

go run main.go
← PrevNext →