fix: 补齐 rows.Err() 检查(R-2,其余包)
覆盖 kb/storage/projectworkflow/docgov/freedoc 与两个 document CLI。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user