Building a web service with go-tool-base, part 1: lifecycle and graceful shutdown
A CLI does its job and gets out of the way. You run it, it prints something or writes a file, the process exits, done. Then one day you want the opposite: a thing that stays running. A server answering requests, a worker …
