Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
treat err assignments as a simple error check
We considered the following pattern a "simple" error check, where err was declared with `:=` and immediately followed by an if: x, err := f() if err != nil {...} We would then remove the empty line before the error check. However, we wouldn't do the same if x and err were already declared: x, err = f() if err != nil {...} The second form is still relatively common, and there's no good reason for the check to treat the two cases differently. Fixes #271.
- Loading branch information