fixed tests
This commit is contained in:
parent
8b46886de8
commit
c70ad9b688
3
app.go
3
app.go
@ -17,6 +17,8 @@ type App struct {
|
|||||||
HelpName string
|
HelpName string
|
||||||
// Description of the program.
|
// Description of the program.
|
||||||
Usage string
|
Usage string
|
||||||
|
// Text to override the USAGE section of help
|
||||||
|
UsageText string
|
||||||
// Description of the program argument format.
|
// Description of the program argument format.
|
||||||
ArgsUsage string
|
ArgsUsage string
|
||||||
// Version of the program
|
// Version of the program
|
||||||
@ -73,6 +75,7 @@ func NewApp() *App {
|
|||||||
Name: os.Args[0],
|
Name: os.Args[0],
|
||||||
HelpName: os.Args[0],
|
HelpName: os.Args[0],
|
||||||
Usage: "A new cli application",
|
Usage: "A new cli application",
|
||||||
|
UsageText: "",
|
||||||
Version: "0.0.0",
|
Version: "0.0.0",
|
||||||
BashComplete: DefaultAppComplete,
|
BashComplete: DefaultAppComplete,
|
||||||
Action: helpCommand.Action,
|
Action: helpCommand.Action,
|
||||||
|
@ -22,6 +22,7 @@ func ExampleApp() {
|
|||||||
app.Action = func(c *Context) {
|
app.Action = func(c *Context) {
|
||||||
fmt.Printf("Hello %v\n", c.String("name"))
|
fmt.Printf("Hello %v\n", c.String("name"))
|
||||||
}
|
}
|
||||||
|
app.UsageText = "app [first_arg] [second_arg]"
|
||||||
app.Author = "Harrison"
|
app.Author = "Harrison"
|
||||||
app.Email = "harrison@lolwut.com"
|
app.Email = "harrison@lolwut.com"
|
||||||
app.Authors = []Author{Author{Name: "Oliver Allen", Email: "oliver@toyshop.com"}}
|
app.Authors = []Author{Author{Name: "Oliver Allen", Email: "oliver@toyshop.com"}}
|
||||||
|
Loading…
Reference in New Issue
Block a user