aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodesoap <codesoap@mailbox.org>2019-10-31 15:26:56 +0100
committercodesoap <codesoap@mailbox.org>2019-10-31 15:26:56 +0100
commit17bc44792cbc3f448a51d2708b7d405e886c1119 (patch)
tree6af6931d05cb98cf2ee157e764b1dc845fae72e2
parentMerge pull request #753 from opencollective/opencollective (diff)
downloadgolite-17bc44792cbc3f448a51d2708b7d405e886c1119.tar.gz
golite-17bc44792cbc3f448a51d2708b7d405e886c1119.tar.xz
Improve readability of Backup()
-rw-r--r--backup.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/backup.go b/backup.go
index 5ab3a54..9754bfc 100644
--- a/backup.go
+++ b/backup.go
@@ -25,18 +25,18 @@ type SQLiteBackup struct {
}
// Backup make backup from src to dest.
-func (c *SQLiteConn) Backup(dest string, conn *SQLiteConn, src string) (*SQLiteBackup, error) {
+func (destConn *SQLiteConn) Backup(dest string, srcConn *SQLiteConn, src string) (*SQLiteBackup, error) {
destptr := C.CString(dest)
defer C.free(unsafe.Pointer(destptr))
srcptr := C.CString(src)
defer C.free(unsafe.Pointer(srcptr))
- if b := C.sqlite3_backup_init(c.db, destptr, conn.db, srcptr); b != nil {
+ if b := C.sqlite3_backup_init(destConn.db, destptr, srcConn.db, srcptr); b != nil {
bb := &SQLiteBackup{b: b}
runtime.SetFinalizer(bb, (*SQLiteBackup).Finish)
return bb, nil
}
- return nil, c.lastError()
+ return nil, destConn.lastError()
}
// Step to backs up for one step. Calls the underlying `sqlite3_backup_step`