feat: short-circuit report fetching if only retrieving a single value

This speeds up report output when specifying a flag as extra data that isn't used will not be fetched unnecessarily.
This commit is contained in:
Jose Diaz-Gonzalez
2020-12-30 00:37:43 -05:00
parent 38b96c1e27
commit 0e320d2832
6 changed files with 10 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ func ReportSingleApp(appName string, infoFlag string) error {
trimPrefix := false
uppercaseFirstCharacter := true
infoFlags := common.CollectReport(appName, flags)
infoFlags := common.CollectReport(appName, infoFlag, flags)
return common.ReportSingleApp("proxy", appName, infoFlag, infoFlags, trimPrefix, uppercaseFirstCharacter)
}