From c019ad708669a4c269072bea933f0a520a78ca7c Mon Sep 17 00:00:00 2001 From: Prateek Sachan <42961174+prateek2211@users.noreply.github.com> Date: Wed, 18 Mar 2020 15:47:18 +0530 Subject: Log errors from rows.Close (#920) * Log errors from rows.Close * fixed imports * Added contextual messages * fixed review changes --- syncapi/storage/postgres/account_data_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'syncapi/storage/postgres/account_data_table.go') diff --git a/syncapi/storage/postgres/account_data_table.go b/syncapi/storage/postgres/account_data_table.go index d1811aa6..d1e3b527 100644 --- a/syncapi/storage/postgres/account_data_table.go +++ b/syncapi/storage/postgres/account_data_table.go @@ -118,7 +118,7 @@ func (s *accountDataStatements) selectAccountDataInRange( if err != nil { return } - defer rows.Close() // nolint: errcheck + defer common.CloseAndLogIfError(ctx, rows, "selectAccountDataInRange: rows.close() failed") for rows.Next() { var dataType string -- cgit v1.2.3