Error strings noncapitalized (#1704)

* Fix error string capitalization

Error strings often follow another string. Hence, they should not be
capitalized, unless referencing a name.

* Uncapitalize more error strings

While here, use %v on the error directly, which makes it easier to wrap
the error later with %w if need be.

* Uncapitalize more error strings

While here, rename Url to URL as a nitpick.
This commit is contained in:
SmallCoccinelle
2021-09-08 03:23:10 +02:00
committed by GitHub
parent d2a0a8fe4c
commit e7f6cb22b7
10 changed files with 26 additions and 19 deletions

View File

@@ -269,10 +269,10 @@ func (r *repository) executeFindQuery(body string, args []interface{}, sortAndPa
idsResult, idsErr = r.runIdsQuery(idsQuery, args)
if countErr != nil {
return nil, 0, fmt.Errorf("Error executing count query with SQL: %s, args: %v, error: %s", countQuery, args, countErr.Error())
return nil, 0, fmt.Errorf("error executing count query with SQL: %s, args: %v, error: %s", countQuery, args, countErr.Error())
}
if idsErr != nil {
return nil, 0, fmt.Errorf("Error executing find query with SQL: %s, args: %v, error: %s", idsQuery, args, idsErr.Error())
return nil, 0, fmt.Errorf("error executing find query with SQL: %s, args: %v, error: %s", idsQuery, args, idsErr.Error())
}
return idsResult, countResult, nil

View File

@@ -78,7 +78,7 @@ func (qb *tagQueryBuilder) Destroy(id int) error {
}
if primaryMarkers > 0 {
return errors.New("Cannot delete tag used as a primary tag in scene markers")
return errors.New("cannot delete tag used as a primary tag in scene markers")
}
return qb.destroyExisting([]int{id})