diff options
| author | Eltrac <hi@guhub.cn> | 2025-11-11 17:46:37 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-11-11 17:46:37 +0800 |
| commit | 363bc4114ccf8e59e7ddbe32361fd8d6eeca93ca (patch) | |
| tree | 9f15930d939490c95490d0fc21717b12eac5478a /main.go | |
| parent | ecf45ce14fc747a530b1ed08ac7bf7a4ab039b1a (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.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 }, } |
