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