From 5b4eead0194e2a6db78815647fd55950ab63a3fc Mon Sep 17 00:00:00 2001 From: yzy613 <59520517+yzy613@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:27:19 +0800 Subject: [PATCH] perf(flag): -v -> -V --- README.md | 8 ++++---- cmd/ddns-watchdog-client/main.go | 2 +- cmd/ddns-watchdog-server/main.go | 2 +- go.mod | 6 +++--- go.sum | 22 +++++++++++++--------- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 3a96256..8e65435 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Usage: -I, --install 安装服务并退出 -n, --network-card 输出网卡信息并退出 -U, --uninstall 卸载服务并退出 - -v, --version 查看当前版本并检查更新后退出 + -V, --version 查看当前版本并检查更新后退出 ``` - `./ddns-watchdog-client -i 01234` 初始化所有配置文件并退出 @@ -71,7 +71,7 @@ Usage: - `systemctl enable ddns-watchdog-client` 开机自启服务 - `./ddns-watchdog-client -U` 卸载服务并退出 (仅限有 systemd 的 Linux 使用) - `./ddns-watchdog-client -f` 强制检查解析记录值 -- `./ddns-watchdog-client -v` 查看当前版本并检查更新后退出 +- `./ddns-watchdog-client -V` 查看当前版本并检查更新后退出 ### 初始客户端配置文件 @@ -265,7 +265,7 @@ Usage: -t, --token string 指定 token (长度在 [16,127] 之间,支持 UTF-8 字符) -l, --token-length int 指定生成 token 的长度 (default 48) -U, --uninstall 卸载服务并退出 - -v, --version 查看当前版本并检查更新后退出 + -V, --version 查看当前版本并检查更新后退出 ``` - `./ddns-watchdog-server -a -g -s -D -A --AAAA -m ` 添加完整的信息并生成 token 再加入白名单 @@ -275,7 +275,7 @@ Usage: - `systemctl start ddns-watchdog-server` 启动服务 - `systemctl enable ddns-watchdog-server` 开机自启服务 - `./ddns-watchdog-server -U` 卸载服务并退出 -- `./ddns-watchdog-server -v` 查看当前版本并检查更新后退出 +- `./ddns-watchdog-server -V` 查看当前版本并检查更新后退出 ### 初始服务端配置文件 diff --git a/cmd/ddns-watchdog-client/main.go b/cmd/ddns-watchdog-client/main.go index 73957cc..284ff13 100644 --- a/cmd/ddns-watchdog-client/main.go +++ b/cmd/ddns-watchdog-client/main.go @@ -23,7 +23,7 @@ var ( installOption = flag.BoolP("install", "I", false, "安装服务并退出") uninstallOption = flag.BoolP("uninstall", "U", false, "卸载服务并退出") enforcement = flag.BoolP("force", "f", false, "强制检查 DNS 解析记录") - version = flag.BoolP("version", "v", false, "查看当前版本并检查更新后退出") + version = flag.BoolP("version", "V", false, "查看当前版本并检查更新后退出") initOption = flag.StringP("init", "i", "", "有选择地初始化配置文件并退出,可以组合使用 (例 01)\n"+ "0 -> "+client.ConfFileName+"\n"+ "1 -> "+client.DNSPodConfFileName+"\n"+ diff --git a/cmd/ddns-watchdog-server/main.go b/cmd/ddns-watchdog-server/main.go index 2513b0a..ab81a05 100644 --- a/cmd/ddns-watchdog-server/main.go +++ b/cmd/ddns-watchdog-server/main.go @@ -16,7 +16,7 @@ var ( confPath = flag.StringP("conf", "c", "", "指定配置文件目录 (目录有空格请放在双引号中间)") installOption = flag.BoolP("install", "I", false, "安装服务并退出") uninstallOption = flag.BoolP("uninstall", "U", false, "卸载服务并退出") - version = flag.BoolP("version", "v", false, "查看当前版本并检查更新后退出") + version = flag.BoolP("version", "V", false, "查看当前版本并检查更新后退出") initOption = flag.StringP("init", "i", "", "有选择地初始化配置文件并退出,可以组合使用 (例 01)\n"+ "0 -> "+server.ConfFileName+"\n"+ "1 -> "+server.ServiceConfFileName+"\n"+ diff --git a/go.mod b/go.mod index 01827ac..c77ed5d 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module ddns-watchdog go 1.22 require ( - github.com/aliyun/alibaba-cloud-sdk-go v1.62.733 + github.com/aliyun/alibaba-cloud-sdk-go v1.62.755 github.com/bitly/go-simplejson v0.5.1 - github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.95 + github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.98 github.com/spf13/pflag v1.0.5 ) @@ -17,7 +17,7 @@ require ( github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect github.com/tjfoc/gmsm v1.4.1 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.24.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 7e4cf71..b409086 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/aliyun/alibaba-cloud-sdk-go v1.62.733 h1:5zAxoug3RqYtPn6f1QU23LKbvyixT4sffnmrf+RiOPw= -github.com/aliyun/alibaba-cloud-sdk-go v1.62.733/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= +github.com/aliyun/alibaba-cloud-sdk-go v1.62.755 h1:WdShZQDooH4cQ0C7SKw6GwGnrqztZZbO8MNHjvHR+kU= +github.com/aliyun/alibaba-cloud-sdk-go v1.62.755/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= github.com/bitly/go-simplejson v0.5.1 h1:xgwPbetQScXt1gh9BmoJ6j9JMr3TElvuIyjR8pgdoow= github.com/bitly/go-simplejson v0.5.1/go.mod h1:YOPVLzCfwK14b4Sff3oP1AmGhI9T9Vsg84etUnlyp+Q= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -42,8 +42,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.95 h1:yOueGmCbpnZnN4rhpIr9KVBfdRnzkRydbrSbcJcGm84= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.95/go.mod h1:j8hJuz4uvsxnzkYmEDO7lB6Jj3TY09KY/DxLUPcO6a8= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.98 h1:R1/GNmGvltl40XxwmcMecJipjXwT8KIkJsQhENAx3KE= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.98/go.mod h1:lhdEO9Bbb3hZ0wG+JeK9/GqMOp/sgc92mFmVk5tNSCk= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -104,9 +104,10 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -135,6 +136,7 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -153,12 +155,14 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=