Apply linter autofixes: internal/database (refs #61)

This commit is contained in:
2026-08-07 16:53:19 +00:00
parent ee83f50281
commit b1451bb17e
28 changed files with 600 additions and 146 deletions

View File

@@ -7,14 +7,15 @@ import (
)
// Fatal prints an error message to stderr and exits with status 1
func Fatal(format string, args ...interface{}) {
func Fatal(format string, args ...any) {
fmt.Fprintf(os.Stderr, "FATAL: "+format+"\n", args...)
os.Exit(1)
}
// CloseRows closes rows and exits on error
func CloseRows(rows *sql.Rows) {
if err := rows.Close(); err != nil {
err := rows.Close()
if err != nil {
Fatal("failed to close rows: %v", err)
}
}