mirror of https://github.com/go-co-op/gocron.git
don't trash the incoming slice, match what was done in NewAtTime (#724)
This commit is contained in:
parent
5f14dac979
commit
917cca7f5c
3
job.go
3
job.go
|
|
@ -291,7 +291,8 @@ type Weekdays func() []time.Weekday
|
|||
// NewWeekdays provide the days of the week the job should run.
|
||||
func NewWeekdays(weekday time.Weekday, weekdays ...time.Weekday) Weekdays {
|
||||
return func() []time.Weekday {
|
||||
return append(weekdays, weekday)
|
||||
weekdays = append(weekdays, weekday)
|
||||
return weekdays
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue