vulnsrc/alpine: avoid shadowing vars
This commit is contained in:
parent
e907e4d263
commit
4c2be5285e
@ -58,19 +58,20 @@ func (u *updater) Update(db database.Datastore) (resp vulnsrc.UpdateResponse, er
|
||||
return
|
||||
}
|
||||
|
||||
// Ask the database for the latest commit we successfully applied.
|
||||
var dbCommit string
|
||||
// Open a database transaction.
|
||||
tx, err := db.Begin()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer tx.Rollback()
|
||||
|
||||
dbCommit, ok, err := tx.FindKeyValue(updaterFlag)
|
||||
// Ask the database for the latest commit we successfully applied.
|
||||
var dbCommit string
|
||||
var ok bool
|
||||
dbCommit, ok, err = tx.FindKeyValue(updaterFlag)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if !ok {
|
||||
dbCommit = ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user