Skip to content

Commit

Permalink
don't trash the incoming slice, match what was done in NewAtTime (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudkucooland committed May 2, 2024
1 parent 5f14dac commit 917cca7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 917cca7

Please sign in to comment.