Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
I just wrote a function that creates a configuration struct that is stored in a Singleton struct, but to create it I called the Singleton to get a connection to the database.
This created an infinite recursive function that maximized connections on the database, as the Singleton never got fully initialized. Not a good idea.
So to fix this I created the configuration after the creation of the Singleton, still calling the singleton from within the function. This worked.
Then I remembered that I could have just passed the connection as a parameter to the function. Like I've done a million times before...
It's time for the weekend, I need a break
rant
stupid mistakes
weekend
singleton
go