2 ms·
This isn't necessarily an argument for named return values. It's an argument for declaring your return value up front and even then it's really just an argument
by zaphar 9y ago
This isn't necessarily an argument for named return values. It's an argument for declaring your return value up front and even then it's really just an argument for Go to do a better job in the compiler here.
Named return values are one way to declare your return value up front but you could just as easily have had a oi := objectInfo{} line at the top of your function too with the same effect.