Skip to content

Commit a8040e5

Browse files
authored
Remove unused isDatabaseOpen method from Manager struct to streamline code and improve maintainability. (#4)
1 parent 6873940 commit a8040e5

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

internal/storage/manager.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,6 @@ func (m *Manager) GetDB() *bbolt.DB {
5454
return nil
5555
}
5656

57-
// isDatabaseOpen checks if the database is open and available
58-
func (m *Manager) isDatabaseOpen() bool {
59-
m.mu.RLock()
60-
defer m.mu.RUnlock()
61-
62-
if m.db == nil || m.db.db == nil {
63-
return false
64-
}
65-
66-
// Test if database is actually usable by attempting a quick read
67-
err := m.db.db.View(func(tx *bbolt.Tx) error {
68-
return nil
69-
})
70-
71-
return err == nil
72-
}
73-
7457
// Upstream operations
7558

7659
// SaveUpstreamServer saves an upstream server configuration

0 commit comments

Comments
 (0)