-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The input for this command line tool is one or more CSV files. Here's an example:
day,note,building hours,chat hours
2021-06-01,,8:00 AM - 6:00 PM,9:00 AM - 11:00 PM
2021-06-02,,8:00 AM - 6:00 PM,9:00 AM - 11:00 PM
2021-06-03,,8:00 AM - 6:00 PM,9:00 AM - 11:00 PM
2021-06-04,friday friday,8:00 AM - 6:00 PM,9:00 AM - 11:00 PM
2021-06-05,,10:00 AM - 2:00 PM,9:00 AM - 9:00 PM
2021-06-06,,8:00 AM - 6:00 PM,9:00 AM - 11:00 PM
2021-06-07,,8:00 AM - 6:00 PM,9:00 AM - 11:00 PM
2021-06-08,,8:00 AM - 6:00 PM,9:00 AM - 11:00 PM
2021-06-09,,8:00 AM - 6:00 PM,9:00 AM - 11:00 PM
Each line in the CSV file corresponds to one day's hours of operation for both the Library building access and the Library chat service. The hours are processed and then created on the Library website automatically using an API.
At line 357 in the function process in main.go, the Library hours have been loaded into a array (slice) of DailyHours objects (structs) called hours.
The DailyHours objects have a property (field) called Day, which is stored as a Time.
The Day should be unique among the DailyHours stored in hours.
If the input file contains duplicate hours for the same day, the application should log the duplicate day, and exit with an error.
Metadata
Metadata
Assignees
Labels
No labels