2026-spring go-apis/lessons/06-testing-handlers/README.md

21 lines518 B

Lesson 6: Testing handlers

Testing handlers comes up in almost every real Go project. We start with the why, then write code together.

Read the full lesson: https://glibcode.net/courses/go-apis/lessons/6

Files

  • hello_test.go: testing a handler with httptest (run: go test)

Tip: go vet ./... catches mistakes the compiler allows.

Run it

go test

Exercises

See exercises.md. Ask in the forum after you have tried.