Re:Singleton Pattern in Go
by vortico on Sunday July 12, 2015 @03:02PM
(#9874494)
What's the point of a singleton when you can just have variables in an anonymous struct at root level, and functions defined at root as well?
[ Parent
| on HN ]
When do you call "serverStart()"? If the answer is "eagerly during startup", there's no problem (other than startup time, of course). If the answer is "on demand", now you have a synchronization problem.