From 91a1e3fe221a2b90a73b0b30c6b65a09c4045876 Mon Sep 17 00:00:00 2001 From: Akkia Date: Sun, 10 Apr 2022 20:28:22 +0800 Subject: [PATCH] fix some typo --- cmd/agent/main.go | 2 +- cmd/agent/monitor/monitor.go | 2 +- cmd/dashboard/controller/oauth2.go | 6 +++--- model/cron.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/agent/main.go b/cmd/agent/main.go index f9fcf50..ef05e78 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -561,7 +561,7 @@ func editAgentConfig() { panic(err) } - fmt.Println("修改自定义配置成功,重启 Agnet 后生效") + fmt.Println("修改自定义配置成功,重启 Agent 后生效") } func println(v ...interface{}) { diff --git a/cmd/agent/monitor/monitor.go b/cmd/agent/monitor/monitor.go index 30b170f..6b20f39 100644 --- a/cmd/agent/monitor/monitor.go +++ b/cmd/agent/monitor/monitor.go @@ -41,7 +41,7 @@ func GetHost(agentConfig *model.AgentConfig) *model.Host { hi, _ := host.Info() var cpuType string if hi.VirtualizationSystem != "" { - cpuType = "Vrtual" + cpuType = "Virtual" } else { cpuType = "Physical" } diff --git a/cmd/dashboard/controller/oauth2.go b/cmd/dashboard/controller/oauth2.go index aebe78a..16b9490 100644 --- a/cmd/dashboard/controller/oauth2.go +++ b/cmd/dashboard/controller/oauth2.go @@ -50,11 +50,11 @@ func (oa *oauth2controller) getCommonOauth2Config(c *gin.Context) *oauth2.Config } func (oa *oauth2controller) getRedirectURL(c *gin.Context) string { - schame := "http://" + scheme := "http://" if strings.HasPrefix(c.Request.Referer(), "https://") { - schame = "https://" + scheme = "https://" } - return schame + c.Request.Host + "/oauth2/callback" + return scheme + c.Request.Host + "/oauth2/callback" } func (oa *oauth2controller) login(c *gin.Context) { diff --git a/model/cron.go b/model/cron.go index ff1aa11..f4394c2 100644 --- a/model/cron.go +++ b/model/cron.go @@ -24,7 +24,7 @@ type Cron struct { LastResult bool // 最后一次执行结果 Cover uint8 - CronJobID cron.EntryID `gorn:"-"` + CronJobID cron.EntryID `gorm:"-"` ServersRaw string }