Build bookings from a template
A bed and breakfast creates bookings with default nights, a valid stay and a template of extras.
What needs to change
Repair Build so every booking starts from the same template.
Reproduce
- Pipe the sample template and guests into go run main.go and compare each booking line.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains its imports, readLines, the Booking and Builder types and the complete main.
Input: 1 to 100 template extras on the first line, then 1 to 100 guests, each with a single-word name and 0 to 100 own extras. Extra labels are single words. Keep template and own-extra order; no validation of malformed input is required by the supplied reader.