mirror of
https://github.com/therootcompany/golib.git
synced 2026-11-04 06:55:00 +00:00
log.Fatal(http.ListenAndServe) ignores ctx cancellation, so SIGTERM from systemd hung the process until TimeoutStopSec (90s) triggered SIGKILL. Replace with explicit *http.Server + Shutdown(ctx) driven by the existing signal.NotifyContext ctx so restarts complete in under a second.
golib
Sometimes a little copying, sometimes a little dependency. Too small for their own repos.
The default branch is dev, but the stable, versioned tags are based on main.
Also, my Go Cheatsheet:
Languages
Go
100%