Go Tutorial: Getting Started
Write your first Go program. No setup required — just you and the editor.
Your first Go program
In ten steps you will go from zero to writing real code.
No theory upfront. No vocabulary tests. Just you, a text editor, and a computer that listens.
Each step takes about 30 seconds. Do them in order.
Let's go.
What you'll learn in this Go getting started tutorial
This interactive Go tutorial has 10 hands-on exercises. Estimated time: 10 minutes.
- Your first Go program 🐹 — Welcome! You just picked one of the fastest, most practical languages in tech.
- Make it personal — See the text inside the quotes? That's what the computer says out loud.
- Say more stuff — One `fmt.Println()` = one line of output. Want two lines? Use two.
- Go big — three lines — Let's go bigger. Three `fmt.Println()` calls, three lines of output.
- The front door: func main() — Every Go program has a `func main()`. It's the front door — Go walks in, finds `main`, and starts running whatever's ins…
- The toolbox: import — `import "fmt"` loads a built-in toolbox called **fmt** (short for "format").
- Bug hunt: round 1 🔍 — Time to play detective. This code has a bug — it won't run.
- Bug hunt: round 2 🔍 — Another bug, different flavor.
- Write it from scratch ✍️ — No training wheels this time. The `main` block is empty.
- Chapter 1 complete! 🎉 — Let's recap what you just learned:
Go Getting Started concepts covered
- Your first Go program