The strategy list moves into the engine (AllStrategies), where the API and frontend will read it too: one source of truth, per the handoff. main shrinks to the standard Go shell pattern: all work happens in run(out io.Writer) error; main only maps the error to stderr and the exit code. Writing to an interface instead of stdout is what lets main_test.go capture output in a bytes.Buffer. errcheck flagged every unchecked Fprintf, so formatting became pure Sprintf string building with one checked write at the end: nicer than discarding four errors with '_, _ ='. |
||
|---|---|---|
| .. | ||
| engine | ||