app: Allocate Metadata map automatically
This commit is contained in:
4
app.go
4
app.go
@@ -160,6 +160,10 @@ func (a *App) Setup() {
|
||||
a.categories = a.categories.AddCommand(command.Category, command)
|
||||
}
|
||||
sort.Sort(a.categories)
|
||||
|
||||
if a.Metadata == nil {
|
||||
a.Metadata = make(map[string]interface{})
|
||||
}
|
||||
}
|
||||
|
||||
// Run is the entry point to the cli app. Parses the arguments slice and routes
|
||||
|
Reference in New Issue
Block a user