diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -55,6 +55,31 @@ func main() { for pkg, version := range installedPackages { fmt.Printf("%s: %s\n", pkg, version) } + + // Detect the Linux distribution + distro := detectDistro() + if distro == "" { + fmt.Println("Unable to detect Linux distribution.") + return + } + + fmt.Printf("Detected distribution: %s\n", distro) + + // Get the list of installed packages for the detected distro + packages, err := getPackageList(distro) + if err != nil { + fmt.Println("Error:", err) + return + } + + // Print the installed packages + fmt.Println("Installed Packages:") + for _, pkg := range packages { + if pkg != "" { + fmt.Println(pkg) + } + } + go NewWatchdog() startHTTP() |
