harbor run -t openthoughts/tasktrove-exp-rpt-stack-go-v4-stack-go-0712harbor download openthoughts/tasktrove-exp-rpt-stack-go-v4-stack-go-0712Implement a Schedule struct and related methods in Go that satisfy the following functionality and requirements:
New(schedule string) (*Schedule, error):
Schedule object or an error if the string is invalid.(. *Schedule) hasDayOfWeek(day time.Weekday) bool:
true if the day exists in the schedule's dayOfWeek map; otherwise, returns false.(. *Schedule) getTodayTrigger(now time.Time) time.Time:
now) and returns a time.Time object representing this trigger.(. *Schedule) GetNextTrigger(now time.Time) (time.Time, error):
now).(. *Schedule) Copy() *Schedule:
Schedule instance, ensuring that the original and copied instances are distinct.The Schedule struct should have the following fields:
hour (int)min (int)dayOfWeek (map[time.Weekday]bool)Place the implementation in a file located at /app/schedule.go. Make sure to include necessary imports and any additional helper methods needed to support the functionality. Ensure that all tests provided in the test code pass successfully after your implementation.
Important: declare your solution in package schedule (the test file uses package schedule, so the implementation must use the matching package name).