Hi Ben Johnson,
Ritwick Ghosh
1

That seems like a reasonable way to test your handler. I tend to use closures with handlers for middleware but otherwise I’ll usually attach functions to a struct for my handlers.

It can be useful to use an interface for your DB that you pass to your handler so you can mock out your data layer and unit test your handler in isolation.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.