Fix lint error

This commit is contained in:
Alessio 2023-08-09 15:36:36 -03:00
parent 7d2f35be68
commit 4a40f35ff6

View File

@ -132,7 +132,7 @@ func (p Profile) GetTweetById(id TweetID) (Tweet, error) {
`, id)
if err != nil {
if err == sql.ErrNoRows {
if errors.Is(err, sql.ErrNoRows) {
return Tweet{}, fmt.Errorf("GetTweetById %d: %w", id, ErrNotInDB)
} else {
panic(err)