1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix missing error check of bufio.Scanner (#29882)

maybe more
This commit is contained in:
coldWater
2024-03-19 10:20:36 +08:00
committed by GitHub
parent 1f0d31ce8f
commit 0e183d81fc
7 changed files with 30 additions and 0 deletions

View File

@@ -124,6 +124,10 @@ func (repo *Repository) GetCodeActivityStats(fromTime time.Time, branch string)
}
}
}
err = scanner.Err()
if err != nil {
return fmt.Errorf("scan: %w", err)
}
a := make([]*CodeActivityAuthor, 0, len(authors))
for _, v := range authors {
a = append(a, v)