add error return to database module

This commit is contained in:
Joel Wetzell
2026-05-17 09:50:01 -05:00
parent 2fdf6d1a61
commit 4bdfe0b00a
4 changed files with 23 additions and 9 deletions
+5 -2
View File
@@ -79,6 +79,9 @@ func (t *DbSqlite) Stop() {
}
}
func (t *DbSqlite) Database() *sql.DB {
return t.db
func (t *DbSqlite) Database() (*sql.DB, error) {
if t.db == nil {
return nil, fmt.Errorf("database not initialized")
}
return t.db, nil
}