优化部分错误

This commit is contained in:
Yun
2025-09-28 22:57:15 +08:00
parent e14305f66c
commit 62bdf4fcd2
3 changed files with 49 additions and 50 deletions
+3
View File
@@ -3,6 +3,7 @@ package timerx
import "errors"
var (
// 定时器不存在
ErrTimerNotFound = errors.New("timer not found")
// 任务ID不能为空
ErrTaskIdEmpty = errors.New("taskId can not be empty")
@@ -24,4 +25,6 @@ var (
ErrIntervalTime = errors.New("interval time must be greater than 0")
// 任务Id已存在
ErrTaskIdExists = errors.New("taskId already exists")
// 任务已执行
ErrTaskExecuted = errors.New("task already executed")
)