func NewDayTimeSchedule(days []time.Weekday, hour, minutes, seconds int) ScheduleTime {
	var daySet = make(map[time.Weekday]struct{})
	for _, d := range days {
		daySet[d] = struct{}{}
	}
	return &dayTimeSchedule{
		daySet,
		hour, minutes, seconds,
	}
}
NewDayTimeSchedule creates a ScheduleTime that runs once a day at a given
hour, minutes and seconds only on the given set of days.
package flamingo
import "time"
type ScheduleTime interface {
	Next(time.Time) time.Time
}
type intervalSchedule struct {
	every time.Duration
}
func NewIntervalSchedule(every time.Duration) ScheduleTime {
	return &intervalSchedule{
		every,
	}
}
func (s *intervalSchedule) Next(now time.Time) time.Time {
	return now.Add(s.every)
}
type timeSchedule struct {
	hour, minutes, seconds int
}
func NewTimeSchedule(hour, minutes, seconds int) ScheduleTime {
	return &timeSchedule{
		hour, minutes, seconds,
	}
}
func (s *timeSchedule) Next(now time.Time) time.Time {
	d := time.Date(
		now.Year(),
		now.Month(),
		now.Day(),
		s.hour,
		s.minutes,
		s.seconds,
		0,
		now.Location(),
	)
	if d.Before(now) {
		d = d.Add(24 * time.Hour)
	}
	return d
}
type dayTimeSchedule struct {
	days                   map[time.Weekday]struct{}
	hour, minutes, seconds int
}