diff options
| author | Eltrac <hi@guhub.cn> | 2025-11-21 08:57:56 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-11-21 08:57:56 +0800 |
| commit | 3ce76a4e0be8edef6ee90ff4edb291aadb200e99 (patch) | |
| tree | 0c07eea2c478d83e368348760a152fc1a5a8e1d6 /statistics.go | |
| parent | c2f95c4002c3a3324752b7308c36cd8a0465e9fd (diff) | |
refactor: move print entry point to statistics.Print()
Diffstat (limited to 'statistics.go')
| -rw-r--r-- | statistics.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/statistics.go b/statistics.go index 6c7ed88..0cd7d44 100644 --- a/statistics.go +++ b/statistics.go @@ -5,6 +5,7 @@ import ( "path/filepath" "syscall" "time" + "fmt" ) type statistics struct { @@ -73,3 +74,15 @@ func NewStatistics(formula *FormulaInfo, cask *CaskInfo, pkgName string) (*stati return &statObject } + +func (s *statistics) Print() { + if s == nil { + fmt.Println("Package not found.") + return + } + + PrintHeader(s) + PrintUserInteractionSummary(s) + PrintMetadata(s) + fmt.Println() +} |
