diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-18 10:10:39 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-18 10:10:39 +0200 |
| commit | 69f5017434298f1ffd4cdc30c30b95d0f4bd344f (patch) | |
| tree | c41a378bc8c4c7338f392cde7a4185658d4dfb12 /internal/stats/stats.go | |
| parent | f1951f2ee1e83d802030c257d4a1df099ec08976 (diff) | |
refactor: enforce Go best practices (function size, ordering, formatting)
- config: split set() (62L) into setSizeAndTuning() + setDisplayFlags()
- collector: split Run() (70L) into Run + startLocalScanner + startRemoteScanner
+ parseCollectorStream + dispatchCollectorLine; each <30L
- collector: remove unused script_embed.go (RemoteScript was dead code)
- display: move newRunState constructor before Run() per constructor-first rule
- display: replace loadPeak IIFE with a plain initLoadPeak variable
- display: split handleKey() (114L) into handleToggleKeys + handleAdjustAndSave
+ handleResizeKeys; add nil guard in handleResizeKeys for test safety
- display: split drawNetBarSmoothed() (75L) into drawNetBarSmoothed +
smoothNetUtilization + drawNetHalves; each <30L
- all: gofmt -w to fix formatting drift in display and config files
All tests pass (go test ./...).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/stats/stats.go')
0 files changed, 0 insertions, 0 deletions
