This question is not strictly programming related, but for sure important for programmers.
I wrote a simple smtp server, when I run it from console all is fine, except i
Supervisord works really well for this in my experience.
You write your app to run on the command line, print stuff etc and supervisord takes care of all the daemonising, restarting if it goes wrong, rate limiting etc, etc
I believe that forking go programs into the background in the traditional unix way is difficult because the runtime starts some threads before it runs your main()
routine