Ahmed Ghazey
Dec 13, 2023

--

I believe at this point there is no wrong answer I had witnessed some senior engineers using a seperate map and use only one instance other using sync.once to make singleton others prefer your manner, and of course I prefer mine.

I can say I tried all of them btw, and this is suitable for all cases.

--

--

Ahmed Ghazey
Ahmed Ghazey

Written by Ahmed Ghazey

Seasoned Senior Staff Software Engineer with a proven track record of delivering complex software solutions, managing teams, and providing technical leadership.

No responses yet