Skip to content

Commit 7baba32

Browse files
committed
rename function
1 parent 6d3cb35 commit 7baba32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/cron/cron.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ var c = cron.New()
2929
// Prevent duplicate running tasks.
3030
var taskStatusTable = sync.NewStatusTable()
3131

32-
// CronFunc defines a cron function
33-
type CronFunc func()
32+
// Func defines a cron function body
33+
type Func func()
3434

3535
// WithUnique wrap a cron func with an unique running check
36-
func WithUnique(name string, body CronFunc) CronFunc {
36+
func WithUnique(name string, body Func) Func {
3737
return func() {
3838
if !taskStatusTable.StartIfNotRunning(name) {
3939
return

0 commit comments

Comments
 (0)