Archived
优化代码
This commit is contained in:
@@ -323,9 +323,9 @@ func (this *FileListDB) ListHashes(lastId int64) (hashList []string, maxId int64
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
|
var id int64
|
||||||
|
var hash string
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id int64
|
|
||||||
var hash string
|
|
||||||
err = rows.Scan(&id, &hash)
|
err = rows.Scan(&id, &hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = rows.Close()
|
_ = rows.Close()
|
||||||
@@ -334,6 +334,8 @@ func (this *FileListDB) ListHashes(lastId int64) (hashList []string, maxId int64
|
|||||||
maxId = id
|
maxId = id
|
||||||
hashList = append(hashList, hash)
|
hashList = append(hashList, hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ = rows.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user