Merge branch 'master' into deps
This commit is contained in:
commit
974c4459c7
3
app.go
3
app.go
@ -110,7 +110,6 @@ func NewApp() *App {
|
|||||||
HelpName: filepath.Base(os.Args[0]),
|
HelpName: filepath.Base(os.Args[0]),
|
||||||
Usage: "A new cli application",
|
Usage: "A new cli application",
|
||||||
UsageText: "",
|
UsageText: "",
|
||||||
Version: "0.0.0",
|
|
||||||
BashComplete: DefaultAppComplete,
|
BashComplete: DefaultAppComplete,
|
||||||
Action: helpCommand.Action,
|
Action: helpCommand.Action,
|
||||||
Compiled: compileTime(),
|
Compiled: compileTime(),
|
||||||
@ -141,7 +140,7 @@ func (a *App) Setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if a.Version == "" {
|
if a.Version == "" {
|
||||||
a.Version = "0.0.0"
|
a.HideVersion = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if a.BashComplete == nil {
|
if a.BashComplete == nil {
|
||||||
|
@ -192,15 +192,11 @@ func ExampleApp_Run_noAction() {
|
|||||||
// USAGE:
|
// USAGE:
|
||||||
// greet [global options] command [command options] [arguments...]
|
// greet [global options] command [command options] [arguments...]
|
||||||
//
|
//
|
||||||
// VERSION:
|
|
||||||
// 0.0.0
|
|
||||||
//
|
|
||||||
// COMMANDS:
|
// COMMANDS:
|
||||||
// help, h Shows a list of commands or help for one command
|
// help, h Shows a list of commands or help for one command
|
||||||
//
|
//
|
||||||
// GLOBAL OPTIONS:
|
// GLOBAL OPTIONS:
|
||||||
// --help, -h show help (default: false)
|
// --help, -h show help (default: false)
|
||||||
// --version, -v print the version (default: false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExampleApp_Run_subcommandNoAction() {
|
func ExampleApp_Run_subcommandNoAction() {
|
||||||
@ -256,8 +252,6 @@ func ExampleApp_Run_bashComplete_withShortFlag() {
|
|||||||
// -x
|
// -x
|
||||||
// --help
|
// --help
|
||||||
// -h
|
// -h
|
||||||
// --version
|
|
||||||
// -v
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExampleApp_Run_bashComplete_withLongFlag() {
|
func ExampleApp_Run_bashComplete_withLongFlag() {
|
||||||
|
@ -154,14 +154,11 @@ NAME:
|
|||||||
USAGE:
|
USAGE:
|
||||||
greet [global options] command [command options] [arguments...]
|
greet [global options] command [command options] [arguments...]
|
||||||
|
|
||||||
VERSION:
|
|
||||||
0.0.0
|
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
help, h Shows a list of commands or help for one command
|
help, h Shows a list of commands or help for one command
|
||||||
|
|
||||||
GLOBAL OPTIONS
|
GLOBAL OPTIONS
|
||||||
--version Shows version information
|
--help, -h show help (default: false)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Arguments
|
### Arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user