Skip to content

fix hidden errors#156

Closed
matoubidou wants to merge 1 commit intojordan-wright:masterfrom
matoubidou:fix-hidden-errors
Closed

fix hidden errors#156
matoubidou wants to merge 1 commit intojordan-wright:masterfrom
matoubidou:fix-hidden-errors

Conversation

@matoubidou
Copy link
Copy Markdown

Hello,

thank for this neat library! Just stumbled over some swallowed errors. IMHO named returned values are always a little bit dangerous. In your case the returned named error was not set as a new one was defined, i.e.:

func foo() (err error) {
  err := barReturningAnErrror()
  if err != nil {
    return
  }
}

will not return anything. Hopefully I got all occurrences of the issue.

Best regards

Mathias Zeller mathias.zeller@mercedes-benz.com Mercedes-Benz Tech Innovation GmbH (ProviderInformation)

@matoubidou
Copy link
Copy Markdown
Author

Closing in favor of #163 (re-submitted from new account)

@matoubidou matoubidou closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant