Linting and comments.

This commit is contained in:
2020-12-23 20:55:50 +05:00
parent 08d5f36c36
commit 115e5d5051
5 changed files with 17 additions and 8 deletions

View File

@@ -137,7 +137,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
// Process request type. Here we process only known requests types,
// by default request should go to specific application's handler.
// all other requests will produce HTTP 400 error.
switch rInfo.RequestType {
// ToDo: move to constants.
case "apps_list":

View File

@@ -22,6 +22,8 @@ type HTTPServer struct {
server *http.Server
}
// NewHTTPServer creates HTTP server and executes preliminary initialization
// (HTTP server structure initialized but it doesn't start).
func NewHTTPServer(ctx context.Context, cfg *configuration.Config, logger *logger.Logger) (*HTTPServer, chan struct{}) {
h := &HTTPServer{
config: cfg,