go fmt
This commit is contained in:
parent
3301148bb7
commit
b42b0a667e
|
@ -105,7 +105,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
||||||
// overwriting the lockfile if we store a file called 'store.lock'.
|
// overwriting the lockfile if we store a file called 'store.lock'.
|
||||||
// However, in this case it's OK because the keys are set by
|
// However, in this case it's OK because the keys are set by
|
||||||
// GtS and not the user, so we know we're never going to overwrite it.
|
// GtS and not the user, so we know we're never going to overwrite it.
|
||||||
LockFile: path.Join(storageBasePath, "store.lock"),
|
LockFile: path.Join(storageBasePath, "store.lock"),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error creating storage backend: %s", err)
|
return fmt.Errorf("error creating storage backend: %s", err)
|
||||||
|
|
|
@ -36,7 +36,7 @@ func processSQLiteError(err error) db.Error {
|
||||||
// Handle supplied error code:
|
// Handle supplied error code:
|
||||||
switch sqliteErr.Code() {
|
switch sqliteErr.Code() {
|
||||||
case sqlite3.SQLITE_CONSTRAINT_UNIQUE, sqlite3.SQLITE_CONSTRAINT_PRIMARYKEY:
|
case sqlite3.SQLITE_CONSTRAINT_UNIQUE, sqlite3.SQLITE_CONSTRAINT_PRIMARYKEY:
|
||||||
return db.NewErrAlreadyExists(err.Error())
|
return db.NewErrAlreadyExists(err.Error())
|
||||||
default:
|
default:
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue