diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-18 09:13:28 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-18 09:13:28 +0200 |
| commit | 3f85aa438bffaad287a450898c44942634944c22 (patch) | |
| tree | 1e5ec6303d45d5003cf548bb1df58b34038b7113 /integrationtests/sync_test.go | |
| parent | 1731c3723ced92a5dc8e54fb0caf4e33b2c7ba70 (diff) | |
refactor: pass flags.Config explicitly, remove flags.Get() from library code (task 429)
flags.Get() (global mutable singleton) was called inside library packages,
coupling them to global state and making tests fragile (DIP violation).
- internal.Run() now takes an explicit flags.Config; main.go calls
flags.Get() once at the CLI boundary and passes it in.
- tui.Run(), RunWithTraceStarter(), RunTestFlamesWithTraceStarter() removed;
callers already used the WithConfig variants directly.
- tui.NewModel() preserved for test ergonomics but now uses flags.NewFlags()
(pure defaults) instead of flags.Get() (global state).
- Tests updated to use NewModelWithConfig() with explicit config structs
instead of flags.Set*() + NewModel(), eliminating all test-level
global-state mutation.
flags.Get() is now called only in cmd/ior/main.go, the correct boundary.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'integrationtests/sync_test.go')
0 files changed, 0 insertions, 0 deletions
