O'Reilly logo
  • Jose E Colon Rodriguez thinks this is interesting:

A short variable declaration acts like an assignment only to variables that were already declared in the same lexical block; declarations in an outer block are ignored

From

Cover of The Go Programming Language

Note

So if you have err from an outer block, := will re-declare it in the current scope.