A few notes
Goroutines are not threads, you can use the term lightweight threads but that also could confuse the devs that does not know what they actually mean.
Os.Exit is not actually fine, the other layers may remain in memory processing and doing their stuff on different system threads. You need to send the shutdown signal to all your layers and goroutines. Easiest way is by cancelling a Context.
I appreciate the feedback, man.
I understand goroutines aren't threads on their own, and that they're more akin to scheduled tasks.
And I actually didn't know that there were lingering side-effects of os.Exit (the docs don't exactly go into that), thanks for pointing that out.
I didn't know anything about the Cake pattern until recently when I read this article
However so far I'm not impressed.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.