From 3ce76a4e0be8edef6ee90ff4edb291aadb200e99 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 21 Nov 2025 08:57:56 +0800 Subject: refactor: move print entry point to statistics.Print() --- statistics.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'statistics.go') 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() +} -- cgit v1.2.3