Simple middleware design pattern
These examples show the power of Go by progressing from very simple HTTP endpoints to using middleware to make our system expandable and easily customizable.
In this example, we don't use any middleware, just use the simple endpoints Go provides to us out of the box.
An example of very basic middleware in Go.
Middleware with a routing server added.
Nesting request and response types on endpoints to make them easily testable.
Adding a simple MySQL database connection to the server to expand the functionality of our code.