From 7d6d00a0e6262f48996b85ed43c03ffa0499e113 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 14:13:04 +0100 Subject: [PATCH] ax(logging): replace prose comment on New 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. "New creates a new Logger with the given configuration" restated the signature — replaced with a callable example. Co-Authored-By: Charon --- pkg/logging/logger.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/logging/logger.go b/pkg/logging/logger.go index 26ac743..4c4d671 100644 --- a/pkg/logging/logger.go +++ b/pkg/logging/logger.go @@ -64,7 +64,8 @@ func DefaultConfig() Config { } } -// New creates a new Logger with the given configuration. +// New creates a Logger with the given configuration. +// logger := logging.New(logging.Config{Output: os.Stderr, Level: logging.LevelInfo, Component: "mining"}) func New(cfg Config) *Logger { if cfg.Output == nil { cfg.Output = os.Stderr