diff options
| author | Eltrac <hi@guhub.cn> | 2025-11-21 09:33:55 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-11-21 09:33:55 +0800 |
| commit | 963b66e9e7047a188cc31319212d21a78cff49b0 (patch) | |
| tree | b055fb9cac78f4a07018e1e9d5c93efa77d5a0ca /statistics.go | |
| parent | 1770b8369467ca3f698bd948c634d11d4594240e (diff) | |
perf: concurrently get brew info and reverse dependencies
Diffstat (limited to 'statistics.go')
| -rw-r--r-- | statistics.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/statistics.go b/statistics.go index 46e89c1..17a01d9 100644 --- a/statistics.go +++ b/statistics.go @@ -26,7 +26,7 @@ type statistics struct { ReverseDependencies []string } -func NewStatistics(formula *FormulaInfo, cask *CaskInfo, pkgName string) *statistics { +func NewStatistics(formula *FormulaInfo, cask *CaskInfo, pkgName string, rvs []string) *statistics { var statObject statistics // === formula/cask specific === // @@ -47,7 +47,7 @@ func NewStatistics(formula *FormulaInfo, cask *CaskInfo, pkgName string) *statis } // get reverse dependencies - statObject.ReverseDependencies = GetBrewUses(pkgName) + statObject.ReverseDependencies = rvs } else if cask != nil { statObject.Name = cask.Token statObject.Type = "cask" |
