Add App extras info
This commit is contained in:
parent
a2943485b1
commit
88ea7cbec8
2
app.go
2
app.go
@ -62,6 +62,8 @@ type App struct {
|
||||
Email string
|
||||
// Writer writer to write output to
|
||||
Writer io.Writer
|
||||
// Other custom info
|
||||
Extras map[string]interface{}
|
||||
}
|
||||
|
||||
// Tries to find out when this binary was compiled.
|
||||
|
@ -197,7 +197,7 @@ func (c Command) HasName(name string) bool {
|
||||
|
||||
func (c Command) startApp(ctx *Context) error {
|
||||
app := NewApp()
|
||||
|
||||
app.Extras = ctx.App.Extras
|
||||
// set the name and usage
|
||||
app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
|
||||
if c.HelpName == "" {
|
||||
|
Loading…
Reference in New Issue
Block a user