1. What runs here — and how to read a lesson
This is a hands-on Go course. You won't just read about Go; you'll
write real Go programs and run them, lesson after lesson, until the
language is muscle memory. Everything runs right here in your browser —
no install, no $GOPATH, no setup.
Genuine Go, running in your tab
The code boxes below run a real Go interpreter compiled to WebAssembly.
Nothing is sent to a server — the whole thing executes in your browser.
The code you write is ordinary Go: the same program runs unchanged
when you install Go and type go run main.go on your own machine.
The one rule: every runnable box is a complete program. Go isn't a
REPL — you don't run loose statements, you run whole programs. So each box
starts with package main, imports what it needs, and does its work
inside func main(). Here's the smallest one that does anything:
package main
import "fmt"
func main() {
fmt.Println("Hello from Go, running in your browser.")
}
Hit ▶ Run. You'll see the printed line appear below the box. Change the text, run it again — it's yours to break.
Three kinds of code box
1. Playground — editable, with a ▶ Run button (the box above). Change it, run it, see the output. This is where most learning happens.
2. Your turn — a graded exercise. You complete or fix a program, hit
✓ Check, and it runs your program and compares its output to the
expected output. Get it right and the lesson counts as done. Here's one:
make the program print exactly 7.
package main
import "fmt"
func main() {
// change the 0 so this prints 7
fmt.Println(0)
}
package main
import "fmt"
func main() {
fmt.Println(7)
}
3. Reference only — occasionally you'll see a read-only box with no Run button. That's for Go that needs a real operating system or a full compiler (starting web servers, spawning processes, precise goroutine timing) — things the in-browser interpreter can't fully reproduce. You'll read those, and the companion video course shows them running for real.
A note on errors
Go is strict and it tells you exactly what's wrong. Delete the import "fmt"
line from the first box and run it — you'll get a clear error, because the
program still calls fmt.Println. That strictness is a feature: most mistakes
are caught before your program does any real work.
One honest caveat about this runner: it's a Go interpreter, and it's a
little more relaxed than the real go build compiler on two specific checks —
an unused variable and an unused import are hard compile errors in real
Go, but the in-browser interpreter lets them slide. We'll call this out each
time it matters. Everything else behaves just like the real thing.
That's the whole loop: read → run → your turn. Next up: your first program, taken apart line by line.