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