Skip to main content

What it flags

A function returns success immediately after a Go database/sql loop reaches the end. Rows.Next() can return false after an iteration error, leaving partial results.

How to review or fix

Check or return rows.Err() after the loop. Closing the iterator does not check the iteration result.