Skip to content

Instantly share code, notes, and snippets.

View IhsanMujdeci's full-sized avatar

IhsanMujdeci IhsanMujdeci

View GitHub Profile
@the-gigi
the-gigi / go2_error_handling_feedback.md
Last active July 17, 2019 06:07
Go 2 Error Handling Feedback

Overview

I like the direction of minimizing error handling boilerplate and repetitive code. But, I think the propose soluiton is too heavy handed especially for the most common case of simply returning an error as is when a called function returns error:

func foo() int, error {
  result, err := bar()
  // If bar() returned an error just return it as is
  if err != nil {
 result , err