Skip to content

Commit

Permalink
fix WithTask method naming
Browse files Browse the repository at this point in the history
Signed-off-by: Augustin Husson <[email protected]>
Signed-off-by: Augustin Husson <[email protected]>
  • Loading branch information
Nexucis committed Mar 6, 2024
1 parent 7099d1c commit 0a4e4fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (r *Runner) WithTasks(t ...interface{}) *Runner {
}

// WithTimerTask is the way to add different tasks that will be executed periodically at the frequency defined with the duration.
func (r *Runner) WithTimerTask(duration time.Duration, t ...interface{}) *Runner {
func (r *Runner) WithTimerTasks(duration time.Duration, t ...interface{}) *Runner {
for _, ts := range t {
r.timerTasks = append(r.timerTasks, timerTask{
task: ts,
Expand All @@ -152,7 +152,7 @@ func (r *Runner) WithTimerTask(duration time.Duration, t ...interface{}) *Runner
return r
}

func (r *Runner) WithCronTask(cronSchedule string, t ...interface{}) *Runner {
func (r *Runner) WithCronTasks(cronSchedule string, t ...interface{}) *Runner {
for _, ts := range t {
r.cronTasks = append(r.cronTasks, cronTask{
task: ts,
Expand Down

0 comments on commit 0a4e4fe

Please sign in to comment.