From 0f2c25f7ef02576def9aa9662b665fc45dd2c0d6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 14:13:01 +0100 Subject: [PATCH] ax(database): replace prose comment on Initialize with usage example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkg/database/database.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/database/database.go b/pkg/database/database.go index a7f4b86..d3ea542 100644 --- a/pkg/database/database.go +++ b/pkg/database/database.go @@ -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()