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:
parent
f8d3ee8c98
commit
0f2c25f7ef
1 changed files with 2 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue