diff --git a/app.go b/app.go index 4097a58..6917fbc 100644 --- a/app.go +++ b/app.go @@ -80,6 +80,8 @@ type App struct { Email string // Writer writer to write output to Writer io.Writer + // Other custom info + Metadata map[string]interface{} } // Tries to find out when this binary was compiled. diff --git a/command.go b/command.go index 2932d53..7f30932 100644 --- a/command.go +++ b/command.go @@ -211,7 +211,7 @@ func (c Command) HasName(name string) bool { func (c Command) startApp(ctx *Context) error { app := NewApp() - + app.Metadata = ctx.App.Metadata // set the name and usage app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name) if c.HelpName == "" {