Merge pull request #196 from codegangsta/fix-deprecated-author-support
Fix support for deprecated author fields
This commit is contained in:
commit
012696c9b0
7
app.go
7
app.go
@ -72,17 +72,14 @@ func NewApp() *App {
|
|||||||
BashComplete: DefaultAppComplete,
|
BashComplete: DefaultAppComplete,
|
||||||
Action: helpCommand.Action,
|
Action: helpCommand.Action,
|
||||||
Compiled: compileTime(),
|
Compiled: compileTime(),
|
||||||
Author: "Dr. James",
|
|
||||||
Email: "who@gmail.com",
|
|
||||||
Authors: []Author{{"Jim", "jim@corporate.com"}, {"Hank", "hank@indiepalace.com"}},
|
|
||||||
Writer: os.Stdout,
|
Writer: os.Stdout,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Entry point to the cli app. Parses the arguments slice and routes to the proper flag/args combination
|
// Entry point to the cli app. Parses the arguments slice and routes to the proper flag/args combination
|
||||||
func (a *App) Run(arguments []string) (err error) {
|
func (a *App) Run(arguments []string) (err error) {
|
||||||
if a.Author != "" && a.Author != "" {
|
if a.Author != "" || a.Email != "" {
|
||||||
a.Authors = append(a.Authors, Author{a.Author, a.Email})
|
a.Authors = append(a.Authors, Author{Name: a.Author, Email: a.Email})
|
||||||
}
|
}
|
||||||
|
|
||||||
if HelpPrinter == nil {
|
if HelpPrinter == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user