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

@@ -70,18 +70,18 @@ func (t *GenerateScreenshotTask) Start(wg *sync.WaitGroup) {
}
if err := SetSceneScreenshot(checksum, coverImageData); err != nil {
return fmt.Errorf("Error writing screenshot: %s", err.Error())
return fmt.Errorf("error writing screenshot: %v", err)
}
// update the scene cover table
if err := qb.UpdateCover(t.Scene.ID, coverImageData); err != nil {
return fmt.Errorf("Error setting screenshot: %s", err.Error())
return fmt.Errorf("error setting screenshot: %v", err)
}
// update the scene with the update date
_, err = qb.Update(updatedScene)
if err != nil {
return fmt.Errorf("Error updating scene: %s", err.Error())
return fmt.Errorf("error updating scene: %v", err)
}
return nil