From dc478dd1e6dc39b9869fc0df8d0319e4571f00bd Mon Sep 17 00:00:00 2001 From: ouqiang Date: Mon, 3 Apr 2017 18:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B0=83=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/install/install.go | 2 +- service/task.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/routers/install/install.go b/routers/install/install.go index 56e7038..1f316ed 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -15,7 +15,7 @@ import ( type InstallForm struct { DbType string `binding:"IN(mysql)"` DbHost string `binding:"Required"` - DbPort int `binding:"Required"` // todo 限制端口范围1-65535, 为什么规则未生效? + DbPort int `binding:"Required;Range(1-65535)"` // todo 限制端口范围1-65535, 为什么规则未生效? DbUsername string `binding:"Required"` DbPassword string `binding:"Required"` DbName string `binding:"Required"` diff --git a/service/task.go b/service/task.go index 4437ed2..47c6e1c 100644 --- a/service/task.go +++ b/service/task.go @@ -1,7 +1,6 @@ package service import ( - "fmt" "github.com/ouqiang/cron-scheduler/models" "github.com/ouqiang/cron-scheduler/modules/ansible" "github.com/ouqiang/cron-scheduler/modules/crontask" @@ -131,7 +130,6 @@ func createTaskLog(taskId int) (int, error) { } func updateTaskLog(taskLogId int, result string, err error) (int64, error) { - fmt.Println(taskLogId) taskLogModel := new(models.TaskLog) var status models.Status if err != nil {