Skip to content

Commit

Permalink
go install 版本信息优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Becivells committed Jan 5, 2022
1 parent 26230ec commit eccb635
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions internal/cli/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit eccb635

Please sign in to comment.