diff options
| author | Eltrac <hi@guhub.cn> | 2025-11-11 10:45:02 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-11-11 10:45:02 +0800 |
| commit | 1c529909aefcdbc3c5a7be542edeaa2f1ae5e5eb (patch) | |
| tree | b63252427be4b9a4bcfb3da4f0c371a15836bdf0 | |
| parent | 7487402fb90a3411b23749d489f58f22b24499f6 (diff) | |
fix(main.go): remove redundant lookup
| -rw-r--r-- | main.go | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -32,19 +32,8 @@ func main() { } pkg := args[1] - // look up formulae - out, brewLookupError := exec.Command("brew", "formulae", "--json=v2", pkg).Output() - if brewLookupError != nil { - fmt.Println("🍺 Homebrew Error:", string(out)) - os.Exit(1) - } - - // parse formulae - var formulae, cask, getformulaeErr = GetInfo(pkg) - if getformulaeErr != nil { - fmt.Println("Error:", getformulaeErr) - os.Exit(1) - } - + // get formulae/cask info + formulae, cask := GetInfo(pkg) + // print info PrintInfo(formulae, cask, pkg) } |
