How Use IT?
Legun opened this issue · 1 comments
Legun commented
How Use it?
soupdiver commented
package main
import (
"log"
apt "github.com/arduino/go-apt-client"
)
func main() {
packages, err := apt.List()
if err != nil {
log.Fatalf("Could not fetch packages: %s", err)
}
log.Print("Installed packages")
for _, p := range packages {
if p.Status != "installed" {
continue
}
log.Printf("%s: %s", p.Name, p.Version)
}
}