make lint happy

This commit is contained in:
fumiama
2021-12-26 15:16:42 +08:00
parent cb44758036
commit 0a95f3198b
6 changed files with 27 additions and 25 deletions

View File

@@ -96,12 +96,18 @@ func (vdb *VtbDB) GetAllFirstCategoryMessage() string {
rows, err := db.Model(&FirstCategory{}).Rows()
if err != nil {
logrus.Errorln("[vtb/model]数据库读取错误", err)
return ""
}
if rows == nil {
return ""
}
defer rows.Close()
for rows.Next() {
db.ScanRows(rows, &fc)
err = db.ScanRows(rows, &fc)
if err != nil {
logrus.Errorln("[vtb/model]数据库读取错误", err)
return ""
}
// logrus.Println(fc)
firstStepMessage = firstStepMessage + strconv.FormatInt(fc.FirstCategoryIndex, 10) + ". " + fc.FirstCategoryName + "\n"
}