Commit c5df5c6
authored
Duplicate code already eliminated - close issue (#817)
Automated analysis reported ~200 lines of duplicate code across 3
patterns. Investigation shows all significant duplication already
eliminated through prior refactoring.
## Findings
**Pattern 1: Logger initialization (~120 lines)** ✅ Resolved
- Generic helpers: `initGlobalLogger[T]()`, `closeGlobalLogger[T]()` in
`global_helpers.go`
- Generic file init: `initLogger[T]()` with customizable fallback in
`common.go`
- Handles all 4 logger types (FileLogger, JSONLLogger, MarkdownLogger,
ServerFileLogger)
**Pattern 2: Flag env getters (~40 lines)** ✅ Resolved
- Extracted to `internal/envutil` package in PR #816
- `GetEnvString()`, `GetEnvInt()`, `GetEnvBool()` with validation
- All flag files migrated
**Pattern 3: Global log functions (~96 lines)** 0 file changed
0 commit comments