25% off

Use code FUNCMAIN at checkout for 25% off all premium courses.

Get started โ†’

Interactive Go ยท Lesson

Hello, World

Every great adventure begins with a single step. In Go, that step is a main function inside the main package โ€” the entry point the Go runtime calls when your program starts.

package main

import "fmt"

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

package main marks this as a runnable program, import "fmt" pulls in Go’s formatting package, and fmt.Println prints a line to the console.

Your Quest

Complete the main function so the program prints exactly:

Hello, Adventurer!

Hint

fmt.Println takes a string in double quotes and prints it followed by a newline.

Additional Scrolls of Wisdom