You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a tip, since this is a common way to burn yourself later. If a function is called "getXXXX" it should only get things, not mutate any data. But you are updating a counter inside the get function.
If someone else reads your code, or you read your own code later, and see a function called "getLeastConnectionsBackend()" being used, you would expect it to just feetch som information for you. And you are unaware that calling it greatly alters the program flow.
Just a friendly tip :)
The text was updated successfully, but these errors were encountered:
simple-load-balancer/lb/lb.go
Line 79 in aebdeeb
Just a tip, since this is a common way to burn yourself later. If a function is called "getXXXX" it should only get things, not mutate any data. But you are updating a counter inside the get function.
If someone else reads your code, or you read your own code later, and see a function called "getLeastConnectionsBackend()" being used, you would expect it to just feetch som information for you. And you are unaware that calling it greatly alters the program flow.
Just a friendly tip :)
The text was updated successfully, but these errors were encountered: