Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlutils cleanups #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Sqlutils cleanups #1

wants to merge 6 commits into from

Conversation

dgryski
Copy link

@dgryski dgryski commented Mar 8, 2016

A number of small tweaks for sqlutils.

Only the defer Close() commit is an actual bug fix. The extra error checks are "nice to have" and reduce errors later in Orchestrator. The rest are style fixes.

/cc @rbastic @sjmudd

The unconditional Close() will cause a nil-pointer deference if err !=
nil, since rows will be nil if there was an error.
gofmt -w -r 'errors.New(fmt.Sprintf(a,b)) -> fmt.Errorf(a,b)' sqlutils.go
@SchumacherFM
Copy link

https://github.com/outbrain/golib/blob/master/sqlutils%2Fsqlutils.go#L74

IMHO: a check for .Valid is missing: cell.Valid

@dgryski
Copy link
Author

dgryski commented Apr 12, 2016

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants