From 5d796ce5cde6b71886e9b02cc271ef4ece88a184 Mon Sep 17 00:00:00 2001 From: tsosunchia <59512455+tsosunchia@users.noreply.github.com> Date: Thu, 14 Dec 2023 14:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=97=B6=E5=BA=94=E7=94=A8=E8=89=B2=E5=BD=A9=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/cmd.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 32d0573..31b8f6a 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -80,13 +80,6 @@ func Excute() { fmt.Print(parser.Usage(err)) return } - if !*jsonPrint { - printer.Version() - } - if *ver { - printer.CopyRight() - os.Exit(0) - } if *nocolor { color.NoColor = true @@ -94,6 +87,15 @@ func Excute() { color.NoColor = false } + if !*jsonPrint { + printer.Version() + } + + if *ver { + printer.CopyRight() + os.Exit(0) + } + domain := *str if *port == 0 {