diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-28 10:06:29 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-28 12:50:12 +0200 |
| commit | 72b5a6f7b2100d228a0f16171c6c08b8f311f0d4 (patch) | |
| tree | 9a1d0424d2b0943b54323cb04445178488370024 /cmd | |
| parent | dbf8980f1bc5428d1eb463505968469617dbf3fc (diff) | |
refactor(task): move debug state into debugConfig struct
DIP/MEDIUM task (UUID 2f64277a): the two bare package-level vars
(debugWriter, debugFile) were mutable shared state that prevented
concurrent test isolation.
Introduce private debugConfig struct and a single package-level
instance (dbg). SetDebugLog and run() are updated to use dbg.writer /
dbg.file. The public API is unchanged so main.go needs no modification.
Add TestSetDebugLog covering: invalid-path error (negative), enable,
log write reaching the file, reconfiguration, and disable.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions
