Skip to content

Returning structs as NullObjects #40

Description

@zolia

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions