• Edit:

    Oh I see what you mean, yes it doesn't supports these things, it couldn't, for that level of gracefully shutdown you're describing we would need a different application on top of our servers, i.e a different process (if I understand correctly, you're talking about hot-reloading and graceful restart with the new source code changes(rebuild) without online clients to be affected or disconnected or losing state. Some programming languages like elixir can do that because they're working on a totally functional way, func input -> output without side affects to the rest of the application, golang can't do that, it has structs and pointers). This graceful shutdown makes the server wait to close any opening connections and it stops new from connecting until the server closed. On the `Shutdown` you can pass a context with a time limit(deadline on how much you're willing to wait in order to close the server) too. Before go 1.8 we did it with custom net.Listener and channels with a 'stop' or/and different conn states, it was awful, now is better.

    I find it very handy, it solves boilerplate code (although I think it has downside on performance for 'hello worlds' apps, authors said that they will probably 'fix' it on go 1.9).