Capitalize error messages according to staticcheck
This commit is contained in:
parent
e3b69e8f83
commit
30f5497aa5
7 changed files with 48 additions and 48 deletions
|
@ -58,7 +58,7 @@ func (r *TutorRepo) Add(tutor models.Tutor) (int, error) {
|
|||
}
|
||||
id, lastInsertIdErr := sqlResult.LastInsertId()
|
||||
if lastInsertIdErr != nil {
|
||||
log.Printf("Error getting Id for new tutor: %s", lastInsertIdErr.Error())
|
||||
log.Printf("error getting Id for new tutor: %s", lastInsertIdErr.Error())
|
||||
}
|
||||
return int(id), err
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ func (r *TutorRepo) getFromRows(rows *sql.Rows) ([]models.Tutor, error) {
|
|||
for rows.Next() {
|
||||
var tutor models.Tutor
|
||||
if err := rows.Scan(&tutor.Id, &tutor.Name, &tutor.Email, &tutor.SubscribeToMailinglist); err != nil {
|
||||
err = fmt.Errorf("Error scanning tutor row: %w", err)
|
||||
err = fmt.Errorf("error scanning tutor row: %w", err)
|
||||
log.Println(err.Error())
|
||||
return tutors, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue