mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
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:
@@ -156,7 +156,7 @@ func Backup(db *sqlx.DB, backupPath string) error {
|
||||
logger.Infof("Backing up database into: %s", backupPath)
|
||||
_, err := db.Exec(`VACUUM INTO "` + backupPath + `"`)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Vacuum failed: %s", err)
|
||||
return fmt.Errorf("vacuum failed: %s", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -272,7 +272,7 @@ func registerCustomDriver() {
|
||||
|
||||
for name, fn := range funcs {
|
||||
if err := conn.RegisterFunc(name, fn, true); err != nil {
|
||||
return fmt.Errorf("Error registering function %s: %s", name, err.Error())
|
||||
return fmt.Errorf("error registering function %s: %s", name, err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ func registerCustomDriver() {
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error registering natural sort collation: %s", err.Error())
|
||||
return fmt.Errorf("error registering natural sort collation: %s", err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user