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"