Install shared reporting flags
This commit is contained in:
@@ -127,10 +127,14 @@ func indexCanonicalNodes(roots map[string]*canonicalNode) map[string]*canonicalN
|
||||
}
|
||||
|
||||
func helpFlagSpellings() map[string]capturedFlagSpelling {
|
||||
flags := make(map[string]capturedFlagSpelling, 2)
|
||||
flags := make(map[string]capturedFlagSpelling, 2+len(commandmeta.ReportingFlags()))
|
||||
for _, spelling := range []capturedFlagSpelling{{name: "help"}, {name: "h", short: true}} {
|
||||
flags[flagSpellingKey(spelling)] = spelling
|
||||
}
|
||||
for _, metadata := range commandmeta.ReportingFlags() {
|
||||
spelling := capturedFlagSpelling{name: metadata.Name}
|
||||
flags[flagSpellingKey(spelling)] = spelling
|
||||
}
|
||||
return flags
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user