Hide version info if user has not defined version

This commit is contained in:
Ajitem Sahasrabuddhe 2019-11-28 12:16:24 +05:30
parent 4805bd168c
commit 864c8349d5
No known key found for this signature in database
GPG Key ID: 5B0EE10DAA76876C

3
app.go
View File

@ -110,7 +110,6 @@ func NewApp() *App {
HelpName: filepath.Base(os.Args[0]),
Usage: "A new cli application",
UsageText: "",
Version: "0.0.0",
BashComplete: DefaultAppComplete,
Action: helpCommand.Action,
Compiled: compileTime(),
@ -141,7 +140,7 @@ func (a *App) Setup() {
}
if a.Version == "" {
a.Version = "0.0.0"
a.HideVersion = true
}
if a.BashComplete == nil {