As others have noted, you can use `net/http/httptest`. I'm not personally a
huge fan of that package, though.
As a result, I wrote an HTTP testing tool to run API tests against my
servers. Of course, it can be used to test against any HTTP service, but it
does happen to be written in Go.
Test
Hey guys,
I’ve written a drop-in replacement for the standard library JSON encoder
which supports the conditional exclusion of fields at runtime based on an
output role.
Basically, it allows you to model a struct once and, for example,
selectively exclude sensitive fields when it's sent to cer