3 ms·
I feel overall those are very reasonable rules. What I do differently: 1) Add context to errors - ok but sometimes the parent caller doesn't expect or wants th
by greyman 5y ago
I feel overall those are very reasonable rules. What I do differently:
1) Add context to errors - ok but sometimes the parent caller doesn't expect or wants that.
2) one-letter variables: I use them more, for example k,v for key,value loop through the map, n can be counter, or x is some value inside the loop.
- abahlo 5y agoYeah I actually agree, will make them sound less like a must. In early Go times people would use one-letter variables everywhere which was horrible.