We have our own custom scaffolding (cmd.CatchSignals) which listens for certain signals and then calls a cleanup function which is expected (but not required) to cause the process to shut down. It would be more idiomatic, and safer, to use signal.NotifyContext and pass that context into all long-running server routines which need to be shut down by a signal.
Read more: https://antonz.org/go-1-26/#signal-cause