cosmetics

This commit is contained in:
nikk gitanes
2024-05-26 11:20:47 +03:00
parent 6505d6e55d
commit 9e78740c39
2 changed files with 3 additions and 4 deletions

View File

@@ -138,10 +138,10 @@ func Migrate2(bboltDB, jsonDB TorrServerDB) error {
if err = json.Unmarshal(b, &objectB); err == nil {
return reflect.DeepEqual(objectA, objectB), nil
} else {
err = fmt.Errorf("Error unmashalling B: %s", err.Error())
err = fmt.Errorf("error unmashalling B: %s", err.Error())
}
} else {
err = fmt.Errorf("Error unmashalling A: %s", err.Error())
err = fmt.Errorf("error unmashalling A: %s", err.Error())
}
return false, err
}

View File

@@ -1,7 +1,6 @@
package settings
import (
"errors"
"fmt"
"reflect"
"sort"
@@ -33,7 +32,7 @@ func (v *XPathDBRouter) RegisterRoute(db TorrServerDB, xPath string) error {
newRoute := v.xPathToRoute(xPath)
if slices.Contains(v.routes, newRoute) {
return errors.New(fmt.Sprintf("route \"%s\" already in routing table", newRoute))
return fmt.Errorf("route \"%s\" already in routing table", newRoute)
}
// First DB becomes Default DB with default route