You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// QueryRow executes a query that is expected to return at most one row.// QueryRow always returns a non-nil value. Errors are deferred until// Row's Scan method is called.
This suggests that we should get an error if the query returns more than one row. However Row.Scan() doesn't check that r.rows.Next() returns false after processing one row, so it would ignore any remaining rows.
Conversely "at most one row" suggests that getting no rows is somehow acceptable, but an error is returned in that case. I think it should say "exactly one row".