summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-11 17:46:37 +0800
committerEltrac <hi@guhub.cn>2025-11-11 17:46:37 +0800
commit363bc4114ccf8e59e7ddbe32361fd8d6eeca93ca (patch)
tree9f15930d939490c95490d0fc21717b12eac5478a /main.go
parentecf45ce14fc747a530b1ed08ac7bf7a4ab039b1a (diff)
refactor: separate data processing and printing - `print.go` no longer handles
retrieving atime and other data operations. It just receives info and prints. - New `statistics.go` gather formulae and cask struct and spits out a unified data structure for `print.go` to use. Getting atime and reverse dependencies are moved here as well. - `info.go` is now `brewget.go`, since what it does is basically running `brew info` and `brew uses` commands to gather raw data.
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index ad8deb7..6ea7ed7 100644
--- a/main.go
+++ b/main.go
@@ -27,8 +27,9 @@ func main() {
// prompt
color.White("What the heck is \"%s\" ...?", pkgName)
// search and print
- formulae, cask := GetInfo(pkgName)
- PrintInfo(formulae, cask, pkgName)
+ formulae, cask := GetBrewInfo(pkgName)
+ data := UnifyInfo(formulae, cask, pkgName)
+ PrintInfo(data)
return nil
},
}