From 917cca7f5c7937c0e2a26375d3b477d74ea3b56d Mon Sep 17 00:00:00 2001 From: Scot Bontrager Date: Wed, 1 May 2024 22:30:07 -0500 Subject: [PATCH] don't trash the incoming slice, match what was done in NewAtTime (#724) --- job.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/job.go b/job.go index e939499..5888e25 100644 --- a/job.go +++ b/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 } }