fix: address code review findings
This commit is contained in:
@@ -84,6 +84,9 @@ func NewApp(ctx context.Context, cfg *config.Config) (*App, error) {
|
||||
|
||||
// Close cleans up all application resources in reverse order of initialization.
|
||||
func (a *App) Close() {
|
||||
if a.mbClient != nil {
|
||||
a.mbClient.Close()
|
||||
}
|
||||
if a.db != nil {
|
||||
if err := a.db.Close(); err != nil {
|
||||
log.Printf("Error closing database: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user