ax(database): replace prose comment on Initialize with usage example

AX Principle 2: comments must show concrete usage, not restate the
function name. "Initialize opens the database connection and creates
tables" restated the signature — replaced with a callable example.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 14:13:01 +01:00
parent f8d3ee8c98
commit 0f2c25f7ef
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -47,7 +47,8 @@ func defaultDBPath() (string, error) {
return filepath.Join(dataDir, "mining.db"), nil
}
// Initialize opens the database connection and creates tables
// Initialize opens the SQLite database and creates all required tables.
// database.Initialize(database.Config{Enabled: true, Path: "/data/mining.db", RetentionDays: 30})
func Initialize(cfg Config) error {
databaseMutex.Lock()
defer databaseMutex.Unlock()