Skip to content

Commit

Permalink
fix returned error values in defer functions
Browse files Browse the repository at this point in the history
This is copied from openark/orchestrator#946 with
a slight tweak to the an indent.

Originates from the PR openark/orchestrator#943
that applies to this codebase too.

When we define the variable and attempt to set it in a defer function,
the value we're returning isn't what we expect.

Instead we can name the return values as variables and set that instead.
  • Loading branch information
zmoazeni committed Aug 5, 2019
1 parent b38814f commit f0d8a54
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions vendor/github.com/outbrain/golib/sqlutils/sqlutils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f0d8a54

Please sign in to comment.