← Back to archive

Stdle #22 · defer · 2026-06-28

What does this Go snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

package main
import "fmt"
func main() {
defer func() {
r := recover()
fmt.Println(r == nil)
}()
fmt.Println("no panic")
}
Defer
2 lines
4 attempts left

Answer & explanation