Serving JSON in Go with http.ServeContent

from blog Blog on hjr265.me, | ↗ original
I know many will start with something like Gin whenever they are working on a JSON/HTTP-based backend in Go. I, not entirely sure if the minority, try to stick to Go’s built-in net/http package and, at most, use Gorilla Mux in most of my Go projects. And so serving something simple like JSON is no different from the package’s point of view as any...