Skip to content

Golang Beginner

Hub › Golang › Beginner

What you'll build

A single HTTP endpoint at GET /items that returns a fixed list of three items as JSON. You'll use only the Go standard library — no third-party router, no database, no framework. The exit artifact is a main.go you run with go run main.go and curl from another terminal. Building this is the point of every page in this tier.

The ladder

  1. 01 Install Go — get the toolchain working so the rest of the tier can run.
  2. 02 Hello world — confirm Go runs your code.
  3. 03 Types and variables — the minimum vocabulary to read Go code.
  4. 04 Control flowif and for, the only branching constructs Go ships.
  5. 05 Functions — Go's only reusable unit at this tier.
  6. 06 Structs — what we'll model our handler response with.
  7. 07 Slices — the list type the endpoint will return.
  8. 08 Hello HTTP — start a server, answer a request.
  9. 09 JSON encoding — turn a struct into a JSON byte stream.
  10. 10 Serving JSON — the tier exit artifact.

Start01 Install Go