19 lines441 B

Lesson 6: Testing handlers

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

Full lesson: https://glibcode.net/courses/go-apis/lessons/6

Files

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

Run it

go test

Exercises

See exercises.md. Ask in the forum once you've tried.