Merge pull request #543 from wking/app-description

app: Add App.Description
This commit is contained in:
Jesse Szwedko
2016-10-25 21:54:02 -07:00
committed by GitHub
3 changed files with 77 additions and 16 deletions

6
app.go
View File

@@ -42,6 +42,8 @@ type App struct {
ArgsUsage string
// Version of the program
Version string
// Description of the program
Description string
// List of commands to execute
Commands []Command
// List of flags to parse
@@ -456,10 +458,10 @@ type Author struct {
func (a Author) String() string {
e := ""
if a.Email != "" {
e = "<" + a.Email + "> "
e = " <" + a.Email + ">"
}
return fmt.Sprintf("%v %v", a.Name, e)
return fmt.Sprintf("%v%v", a.Name, e)
}
// HandleAction uses ✧✧✧reflection✧✧✧ to figure out if the given Action is an