Too Long; Didn't Read
In this article, we will try to understand two crucial Go concepts - mux and Handler. But before we start writing any code let us first understand what we need to run a simple web service.
First of all, we need a server itself that will run on some port, listening for the requests and providing responses for those requests.
The next thing we need is a router. This entity is responsible for routing requests to corresponding handlers. In the Go world, servemux is actually an analog of a router.
The last thing we need is a handler. It is responsible for processing a request, executing the business logic of your application, and providing a response for it.