Stop at the first overdue invoice
An invoice tool reads due and paid days and amounts, then reports totals, overdue invoices and fees.
What needs to change
Repair firstOverdue so it reports the first invoice that was paid late.
Reproduce
- Use go run on the three-invoice sample, then Check work for the other input sequences.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains its imports, the Invoice struct, readInvoices, daysLate, visit and main.
visit calls its function for each invoice in order and stops when that function returns false.