【升级go 1.18】

This commit is contained in:
PandaGoAdmin
2022-07-13 11:54:54 +08:00
parent 2e18999587
commit 433ee08634
60 changed files with 253 additions and 248 deletions

View File

@@ -52,7 +52,7 @@ func (j *JobApi) GetJobList(rc *ctx.ReqCtx) {
status := rc.GinCtx.Query("status")
list, total := j.JobApp.FindListPage(pageNum, pageSize, entity.SysJob{JobName: jobName, JobGroup: jobGroup, Status: status})
rc.ResData = map[string]interface{}{
rc.ResData = map[string]any{
"data": list,
"total": total,
"pageNum": pageNum,

View File

@@ -18,7 +18,7 @@ func InitJob() {
type CronHandle struct {
}
func (t CronHandle) Exec(arg interface{}) error {
func (t CronHandle) Exec(arg any) error {
str := time.Now().Format(timeFormat) + " [INFO] JobCore ExamplesOne exec success"
// TODO: 这里需要注意 Examples 传入参数是 string 所以 arg.(string);请根据对应的类型进行转化;
switch arg.(type) {

View File

@@ -8,9 +8,9 @@ type Job interface {
}
type JobsExec interface {
Exec(arg interface{}) error
Exec(arg any) error
}
func CallExec(e JobsExec, arg interface{}) error {
func CallExec(e JobsExec, arg any) error {
return e.Exec(arg)
}