The net/http package contains a few ways of creating the HTTP server. The most simple one is to implement the Handler interface from the net/http package. The Handler interface requires the type to implement the ServeHTTP method. This method handles the request and response.
The server itself is created in the form of the Server struct from the net/http package. The Server struct requires the Handler and Addr fields. By calling the method, ListenAndServe, the server starts serving the content on the given address.
If the Serve method of the Server is used, then the Listener must be provided.
The net/http package provides also the default server which could be used if the ListenAndServe is called as a function from the net/http ...