If you are running HTTP server and want to rate limit requests to the endpoints, you can use well-maintained tools such as github.com/didip/tollbooth. But if you’re building something very simple, it’s not that hard to implement it on your own. There is already an experimental Go package x/time/rate, which we can use. In this tutorial, we’ll create a simple middleware for rate limiting based on th