News for hackers. Stuff that matters.
Re:Google Go: The Good, the Bad, and the Meh by jff on Monday February 11, 2013 @03:41PM (#5203068)
You should be checking errors immediately after they are returned. Once you've checked it, re-use the variable:

  x, err := f(a)
  if err != nil { // probably time to return from the func }
  y, err := g(x) // we have at least 1 new var, so := still works
  if err != nil { // handle }
  x, err = h(y) // since we're re-using both x and err, just use =
I've never appended a number to "err".

There are no comments on this comment yet.