Add a String() method on Decision and a Stats function that takes a slice of decisions and returns counts per decision type.
Contribution Guide
- PRs go to the
dev branch, not main
- Application must explain your specific approach to this task ; generic applications will not be assigned
- PR description must clearly describe what you built and changed
- Link your PR to the correct issue number (e.g.
Closes #12)
Implementation Guidelines
Key files: examples/go-exchange/contract-deposit-firewall/firewall/stats.go
Decision.String() returns "auto-credit", "manual-review", or "quarantine".
Stats(decisions []Decision) map[Decision]int returns count per type.
- Update
main.go to print a summary line after all scenarios: "Results: X auto-credit, Y manual-review, Z quarantine".
Expectations
What done looks like: Summary line at the end of the runner output shows correct counts matching the scenario results.
Discord for questions: codeze_us
Add a
String()method onDecisionand aStatsfunction that takes a slice of decisions and returns counts per decision type.Contribution Guide
devbranch, notmainCloses #12)Implementation Guidelines
Key files:
examples/go-exchange/contract-deposit-firewall/firewall/stats.goDecision.String()returns"auto-credit","manual-review", or"quarantine".Stats(decisions []Decision) map[Decision]intreturns count per type.main.goto print a summary line after all scenarios: "Results: X auto-credit, Y manual-review, Z quarantine".Expectations
What done looks like: Summary line at the end of the runner output shows correct counts matching the scenario results.
Discord for questions: codeze_us