Skip to content

Commit

Permalink
Fix unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
dmashuda committed Feb 6, 2025
1 parent 5b87efb commit 52e2b70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/dev_server/db/backup/sqllite_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,25 +148,25 @@ func (m *Manager) MakeBackupFile(ctx context.Context) (string, error) {
return "", errors.Wrap(err, "open source database")
}

defer func(sourceDb *sql.DB) {
defer func() {
err := sourceDb.Close()
if err != nil {
log.Printf("unable to close source connection: %s", err)
}
}(sourceDb)
}()

// connect to backup to populate sqlite connection
backupDb, err := m.connectToDb(ctx, backupPath)
if err != nil {
return "", errors.Wrap(err, "open backup database")
}

defer func(sourceDb *sql.DB) {
defer func() {
err := backupDb.Close()
if err != nil {
log.Printf("unable to close source connection: %s", err)
}
}(sourceDb)
}()

// validate connection length
if len(m.conns) != 2 {
Expand Down

0 comments on commit 52e2b70

Please sign in to comment.