ax(logging): replace prose comment on New with usage example

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 <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 14:13:04 +01:00
parent 0f2c25f7ef
commit 7d6d00a0e6
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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