kb.maladroit.dev
Checking an error value inaccurately
Mistake
if
err
==
sql
.
ErrNoRows
{
}
Fix
if
errors
.
Is
(
err
,
sql
.
ErrNoRows
)
{
}
References
100 Go Mistakes