A simple Go implementation for graceful shutdown of HTTP servers with Go 1.8+ wrapped in ~20 lines of code.
|
|
The graceful shutdown function can also be used directly as a package from github.com: Graceful Shutdown
info
You should use Go 1.8+
The function doesn’t support TLS servers currently as I don’t need it, but it should be trivial to add that.