NOTE: In many scenarios, invoking a panic will actually be preferable to indicate that there is an error check missing.
I cannot think of a situation when this is not the case. Basically golang users should always check for errors. Returning noop empty struct basically asks for trouble and the user might not instantly realize that imported library function works not as expected. Fail as soon as possible. If there is an error, all other parameters should be ignored by the user.
I cannot think of a situation when this is not the case. Basically golang users should always check for errors. Returning noop empty struct basically asks for trouble and the user might not instantly realize that imported library function works not as expected. Fail as soon as possible. If there is an error, all other parameters should be ignored by the user.