3 ms·
Unlike C, Go isn't overloading what is returned In C, you can write code that doesn't overload errors and return values; e.g., err = someFunction(&returnValue
by Teckla 13y ago
Unlike C, Go isn't overloading what is returned
In C, you can write code that doesn't overload errors and return values; e.g.,
err = someFunction(&returnValue, param1, param2, param3);
I'm not saying this is common -- and in fact the standard C library does a lot of the overloading you're talking about -- but for your own code and functions, you can separate out errors and return values, as shown above.