Fill the harvest basket
Repair the planning-file import helpers: add seedlings to a retained bed record, append picked quantities to a harvest record, then apply bulk additions and between-record transfers. All quantities describe the software’s plan and inventory records.
What needs to change
Repair harvest so the caller’s basket holds the picked fruit.
Reproduce
- Pipe the sample baskets into go run main.go and compare each basket line with the expected stdout.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains its imports, readLines and main, which retains an integer slice log and passes a pointer to its header. append returns the resulting slice value; a local header and the caller’s header can have different lengths.
Input: up to 100 "name basket picked" rows with a single-word name and whole counts from 0 to 100. The supplied caller starts a harvest log with basket, appends the picked entry through harvest and reports its sum. The supplied reader receives valid data.