World Conquest Chronicles

World Conquest Chronicles

go-http-utils, v1.1.1

The library that provides HTTP utility functions.

Adding a simplified interface of the http.Client structure for mocking purposes.

Change Log

  • adding a simplified interface of the http.Client structure for mocking purposes.

Features

  • wrapper for the http.ResponseWriter interface for catching writing errors;
  • simplified interface of the http.Client structure for mocking purposes;
  • middlewares:
    • middleware for catching writing errors;
    • middleware that fallback of requests to static assets to the index.html file (useful in a SPA);
  • analogs:
    • analog of the http.Redirect() function with catching writing errors;
    • analog of the http.FileServer() function with applied above-mentioned middlewares;
  • function to start a server with support for graceful shutdown by a signal.

Repository

Link: https://github.com/thewizardplusplus/go-http-utils/tree/v1.1.1.

Content: code.

License: MIT.