From d4ec9e0e0aa4981a3f6076d50754c24edc9e97cc Mon Sep 17 00:00:00 2001 From: yzy613 Date: Wed, 1 Sep 2021 22:55:45 +0800 Subject: [PATCH] =?UTF-8?q?v1.4.2=20a:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=20Lin?= =?UTF-8?q?ux=20=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=9A=84=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/ddns-watchdog-client/main.go | 28 ++++++++++++++-------------- internal/common/struct.go | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/ddns-watchdog-client/main.go b/cmd/ddns-watchdog-client/main.go index 5ae25b1..c51aac1 100644 --- a/cmd/ddns-watchdog-client/main.go +++ b/cmd/ddns-watchdog-client/main.go @@ -75,6 +75,20 @@ func runFlag() (exit bool, err error) { return } + // 加载客户端配置 + // 不得不放在这个地方,因为有下面的检查版本和安装 / 卸载服务 + err = client.Conf.LoadConf() + if err != nil { + return + } + + // 检查版本 + if *version { + client.Conf.CheckLatestVersion() + exit = true + return + } + // 安装 / 卸载服务 switch { case *installOption: @@ -92,20 +106,6 @@ func runFlag() (exit bool, err error) { exit = true return } - - // 加载客户端配置 - // 不得不放在这个地方,因为有下面的检查版本 - err = client.Conf.LoadConf() - if err != nil { - return - } - - // 检查版本 - if *version { - client.Conf.CheckLatestVersion() - exit = true - return - } return } diff --git a/internal/common/struct.go b/internal/common/struct.go index 247683c..85a0b73 100644 --- a/internal/common/struct.go +++ b/internal/common/struct.go @@ -1,7 +1,7 @@ package common const ( - LocalVersion = "1.4.1" + LocalVersion = "1.4.2" DefaultAPIUrl = "https://yzyweb.cn/ddns-watchdog" DefaultIPv6APIUrl = "https://yzyweb.cn/ddns-watchdog6" ProjectUrl = "https://github.com/yzy613/ddns-watchdog"