From c8a60bec2ee325835fad3d2e341892250377db2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Tue, 17 Oct 2023 20:58:36 -0500 Subject: [PATCH] =?UTF-8?q?fix(climc):=20=E9=81=BF=E5=85=8Dclimc=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E6=A8=A1=E5=BC=8F=E4=B8=8B--help=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=80=80=E5=87=BA=20(#18338)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 2 +- go.sum | 4 ++-- vendor/modules.txt | 2 +- vendor/yunion.io/x/structarg/structarg.go | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 8a06d3273e..5d6ab7de7c 100644 --- a/go.mod +++ b/go.mod @@ -91,7 +91,7 @@ require ( yunion.io/x/pkg v1.0.1-0.20231012131524-8a175238485b yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e yunion.io/x/sqlchemy v1.1.2-0.20231011114043-0d203453d3e2 - yunion.io/x/structarg v0.0.0-20220312084958-9c6c79c7d1c6 + yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c ) require ( diff --git a/go.sum b/go.sum index c4067b5085..6742a0ccd0 100644 --- a/go.sum +++ b/go.sum @@ -1195,5 +1195,5 @@ yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8 yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo= yunion.io/x/sqlchemy v1.1.2-0.20231011114043-0d203453d3e2 h1:DB6wG9VXsnJGaABcfN89wRjRPCCCuJSsd8xob48BD8Q= yunion.io/x/sqlchemy v1.1.2-0.20231011114043-0d203453d3e2/go.mod h1:uuPVZEyEq3sWd5vf9VjGSy6lZzof22X87OEHw9sddJQ= -yunion.io/x/structarg v0.0.0-20220312084958-9c6c79c7d1c6 h1:WuWXhY3DvhdRTzWCJ/kwt3Ss6KIq7+KqJwb+esvNGwU= -yunion.io/x/structarg v0.0.0-20220312084958-9c6c79c7d1c6/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng= +yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c h1:QuLab2kSRECZRxo4Lo2KcYn6XjQFDGaZ1+x0pYDVVwQ= +yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng= diff --git a/vendor/modules.txt b/vendor/modules.txt index c0456084bd..ca380f9b0f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1593,6 +1593,6 @@ yunion.io/x/sqlchemy/backends yunion.io/x/sqlchemy/backends/clickhouse yunion.io/x/sqlchemy/backends/mysql yunion.io/x/sqlchemy/backends/sqlite -# yunion.io/x/structarg v0.0.0-20220312084958-9c6c79c7d1c6 +# yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c ## explicit; go 1.12 yunion.io/x/structarg diff --git a/vendor/yunion.io/x/structarg/structarg.go b/vendor/yunion.io/x/structarg/structarg.go index da6f59d137..5c9eca1ef3 100644 --- a/vendor/yunion.io/x/structarg/structarg.go +++ b/vendor/yunion.io/x/structarg/structarg.go @@ -1008,6 +1008,7 @@ func (this *ArgumentParser) reset() { for _, arg := range this.optArgs { arg.Reset() } + this.help = false } func (this *ArgumentParser) ParseArgs(args []string, ignore_unknown bool) error { @@ -1026,7 +1027,7 @@ func (this *ArgumentParser) ParseArgs2(args []string, ignore_unknown bool, setDe if argStr == "--help" { // shortcut to show help fmt.Println(this.HelpString()) - os.Exit(1) + this.help = true continue } if strings.HasPrefix(argStr, "-") {