From eccb6350ddeaed350d25389cce3d5f729138325f Mon Sep 17 00:00:00 2001 From: becivells <732903873@qq.com> Date: Wed, 5 Jan 2022 13:40:51 +0800 Subject: [PATCH] =?UTF-8?q?go=20install=20=E7=89=88=E6=9C=AC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/cli/parser.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/internal/cli/parser.go b/internal/cli/parser.go index f4f4866..8829e58 100644 --- a/internal/cli/parser.go +++ b/internal/cli/parser.go @@ -254,10 +254,17 @@ func ParseOptions() *Options { if args.Version { printer.Infof("Version: %s", FoFaXVersion) - printer.Infof("Branch: %s", Branch) - printer.Infof("Commit: %s", Commit) - printer.Infof("Date: %s", Date) + if Branch != "unknown" { + printer.Infof("Branch: %s", Branch) + } + if Commit != "unknown" { + printer.Infof("Commit: %s", Commit) + } + if Date != "unknown" { + printer.Infof("Date: %s", Date) + } printer.Infof("CodeName: %s", getVname(FoFaXVersion)) + fmt.Print("fofaX is a command line fofa query tool, simple is the best!\n\n") os.Exit(0) }