fix: 补齐 rows.Err() 检查(R-2,其余包)

覆盖 kb/storage/projectworkflow/docgov/freedoc 与两个 document CLI。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-18 03:40:24 +00:00
co-authored by Cursor
parent b53a97b36d
commit 9038c65329
8 changed files with 27 additions and 9 deletions
+4
View File
@@ -111,6 +111,10 @@ func main() {
os.Exit(1)
}
}
if err := rows.Err(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
enc, _ := json.MarshalIndent(report, "", " ")
if *outPath != "" {
_ = os.WriteFile(*outPath, enc, 0o644)
+4
View File
@@ -116,6 +116,10 @@ func main() {
report.Success++
report.Items = append(report.Items, it)
}
if err := rows.Err(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
enc, _ := json.MarshalIndent(report, "", " ")
if *outPath != "" {
_ = os.WriteFile(*outPath, enc, 0o644)